On Tue, Feb 05, 2002 at 11:09:03AM -0500, Brett wrote:
> my $arrayref1 = [1, 2, 3];
>
> my ($arrayref2, $arrayref3) = sub2($arrayref1);
>
> sub sub2 {
>
> my($arrayref5, ...);
> my $arrayref1 = shift;
>
> return $arrayref6, $arrayref7;
> }
---end quoted text---
A really nice piece of syntactic sugar, I like, is:
@a= qw/foo bar baz/;
@b= qw/1 2 3/;
@c=\(@a,@b); # <-- this line ;o)
# @c is now an array of references to arrays.
# if you used Data::Dumper you'd see:
print Dumper \@c
$VAR1 = [
[
'foo',
'bar',
'baz'
],
[
'1',
'2',
'3'
]
];
neat eh?
--
Frank Booth - Consultant
Parasol Solutions Limited.
(www.parasolsolutions.com)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]