in reply to Re^3: Perl cheat sheet
in thread Perl cheat sheet
$! was an unfortunate choice of variable. :-) It's a dualvar so it has different values if treated as a string or as a numerical.
It's better to just create a copy and pass that, if the subroutine doesn't copy the argument.open my $fh, '<', 'this does not exist'; printf "%s (%d)\n", $!, $!; __END__ No such file or directory (2)
lodin
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Perl cheat sheet (dualvars)
by ikegami (Patriarch) on Jan 07, 2009 at 09:23 UTC |
In Section
Craft