in reply to my $x or my ($x)
In addition to the above, the list context can be useful in a case like this:
Foo: 1, BAR: apple, BAZ: a
Will printmy ($foo, $bar, $baz) = return_an_array(); print "Foo: $foo, BAR: $bar, BAZ: $baz"; sub return_an_array() { my @the_array = ("1","apple","a"); return @the_array; }
Foo: 1, BAR: apple, BAZ: a
Update: added $baz in the correct place. Thanks blogical.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: my $x or my ($x)
by blogical (Pilgrim) on Apr 04, 2006 at 17:49 UTC |
In Section
Seekers of Perl Wisdom