Of course, there is no "One True Way," but this is clean and works.sub frobnicate { $_[0] =~ s/foo/bar/; $_[0] =~ s/\d/\&/g; } my $var = "foo 12345"; frobnicate($var); # $var is now "bar &&&&&"
In reply to Re: style q: duplication? of variables
by nakor
in thread style q: duplication? of variables
by thpfft
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |