in reply to Re: $* is no longer supported
in thread $* is no longer supported
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: $* is no longer supported
by ikegami (Patriarch) on Nov 04, 2009 at 06:12 UTC | |
by JadeNB (Chaplain) on Nov 04, 2009 at 06:17 UTC |