I got the output:use strict; use warnings; my ($a, $b) = ("1_334", 1334); $a += 1; $b += 1; print "$a $b\n"; print "Unequal\n" if ($a != $b); print "$a $b\n";
My question is if $a has already become 2, why does the comparison see "1_334". Also I would have thought that the numeric operator would have considered it as a string (in which case $a should have been 0+1) and evaluated to 1 or as a number 1334 and evaluated to 1335; either way being coverted to a number...2 1335 Argument "1_334" isn't numeric in addition (+) at noname.pl line 6. Unequal 2 1335
In reply to _ in a number within quotes by dilpane
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |