in reply to problem with passing array and hash to sub-routine

`perldoc perlsub'
use strict; { local $\="\n"; print for %INC; } sub foy { my %a = %{shift(@_)}; my @b = @{shift(@_)}; return %a . ' ' . @b; } die foy ( { 1 .. 10 }, [ 1..10 ] ); __END__ strict.pm C:/Perl/lib/strict.pm 4/8 10 at - line 11.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: problem with passing array and hash to sub-routine
by pzbagel (Chaplain) on Aug 06, 2003 at 07:50 UTC

    ++PodMaster. That tripped me up for a minute. However, I have to point out that technically your are using anonymous arrays/hashes(and therefore references;)

    Peace