Can anyone shed some light on why this is happening?
Yes. You :) Use Devel::Peek on $arg in the subroutine before and after you assign to it. Eg:
sub xx { my $arg; Dump( $arg ); $arg = shift; Dump( $arg ); print "(" . ($arg & "") . ")\n"; }
In reply to Re: Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
by BrowserUk
in thread Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
by cheesestraws
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |