in reply to Returning array values
Now I suggest you go and read perldata and perlref, until it all makes sense to you. These are perl basics, and you need to know them by heart.my @Array = ( 1, 2, 3 ); my $ArrayRef = [ 1, 2, 3 ]; $ArrayRef = \@Array; ## How do you "de-reference" an array reference? @Array = @$ArrayRef; @Array = @{$ArrayRef};
update:
Besides knowing the basics perl data structures and references (perl basics), the other important thing to know about is context. japhy wrote an excellent article on that: "List" is a Four-Letter Word.return @array; # DOES NOT RETURN AN ARRAY, IT RETURNS A LIST
____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Returning array values
by cybear (Monk) on Jul 29, 2002 at 10:12 UTC |