Mark Koopman <[EMAIL PROTECTED]> writes:
>> On Fri, 09 Feb 2001 12:06:12 -0500, Ken Fox wrote:

>> That may work for C, but not for Perl.
>> 
>>      sub test {
>>          my($foo, $bar, %baz);
>>          ...
>>          return \%baz;
>>      }

> but is this an example of the way people SHOULD code, or simply are ABLE
> to code this.  are we considering to deprecate this type of bad style,
> and force to a programmer to, in this case, supply a ref to %baz in the
> arguements to this sub?

That's a pretty fundamental aspect of the Perl language; I use that sort
of construct all over the place.  We don't want to turn Perl into C, where
if you want to return anything non-trivial without allocation you have to
pass in somewhere to put it.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to