p4raw-id: //depot/perl@11598
# libc are confused what to call Infinity
+sub fix_inf {
+ $_[0] =~ s/^(inf(?:inity)?|\+\+)$/Inf/i; # HP-UX calls it "++"
+}
+
sub ok_inf {
my ($x, $y) = @_;
- $x =~ s/^inf(?:inity)?/Inf/i;
- $y =~ s/^inf(?:inity)?/Inf/i;
+ fix_inf($x);
+ fix_inf($y);
ok($x, $y);
}