in reply to Re: Perl Syntax that we generally don't know or forget.
in thread Perl Syntax/resources that we generally don't know or forget.
And if I understood lvalue subroutines better, I could probably write "attack($_) = 'x'" instead, for a fourth layer. {grin}my $value = "abcde"; sub attack { $_[0] = "x" } attack($_) for substr($value, 2, 1); print "$value\n"; # prints "abxde\n"
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Re: Perl Syntax that we generally don't know or forget.
by shotgunefx (Parson) on Jan 18, 2004 at 18:15 UTC | |
by ysth (Canon) on Jan 19, 2004 at 02:12 UTC |