in reply to Seeing if two numbers have the same sign

This will work:

my $samesign, $first, $second; if (($first * $second) > 0) { $samesign = 'true'; } elsif (($first * $second) < 0) { { $samesign = 'false'; } else { $samesign = undef; }
The else condition means that one of the numbers is zero, and sifgn doesn't mean anything then.