G
George Mpouras
# it should print string, string but it prints string number
# there is no explanation for this behavior
weird('2') for 1..2;
sub weird {
my $num = $_[0] eq '' ? 0 : $_[0] ^ $_[0] ? 0 : 1;
my $col = $_[0] - 1;
print $num ? "number\n" : "string\n"
}
# there is no explanation for this behavior
weird('2') for 1..2;
sub weird {
my $num = $_[0] eq '' ? 0 : $_[0] ^ $_[0] ? 0 : 1;
my $col = $_[0] - 1;
print $num ? "number\n" : "string\n"
}