Have I got my rules for scoping wrong, or is that code useless?
At least, that's what I'm getting on Perl 5.8.9.my $ro_string = " I'm surrounded by spaces! "; for ($ro_string) { # alias $_ to $ro_string for this scope s/^\s*//; # strip leading spaces from $_ s/\s*$//; # strip trailing spaces from $_ } # lose $_ when the scope ends print; # nothing!
UPDATE: True but irrelevant, as pointed out by Your Mother and ikegami.
In reply to Re^2: $* is no longer supported
by JadeNB
in thread $* is no longer supported
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |