in reply to Re: Re: A question of style
in thread A question of style
Such code smells like a C programmer who couldn't stand to program without memory pointers and grabed the first thing in Perl that looked anything like it. Screwing with pointers is perfectly acceptable in C, as most C programs are very concerned with efficiency. If you're using Perl, you're already giving up so much efficiency over pure C that you can usually ignore the passing style.
If more than one refernce is being changed, then Perl is perfectly capable of returning multiple values as a list instead. For instance:
my ($foo, $bar, $baz) = do_something(); sub do_something { return 1, 2, 3; }
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|