SPUG: Precedence question

Steve Baylis sbaylis at whitepages.com
Mon Jan 22 11:15:57 PST 2007

@$foo[3] returns element 3 from the array reference stored in $foo.

As always, before I open my mouth I like to verify what I'm saying so as
to not lead people astray...

my $foo = [ 'a' .. 'z' ];
my @foo = ( map { [ $_ ] } 0 .. 25 );

print @$foo[3], "\n";



Steve Baylis
Lead Architect

-----Original Message-----
From: spug-list-bounces+sbaylis=whitepages.com at pm.org
[mailto:spug-list-bounces+sbaylis=whitepages.com at pm.org] On Behalf Of
veritosproject at gmail.com
Sent: Monday, January 22, 2007 11:03 AM
To: spug-list at pm.org
Subject: SPUG: Precedence question

does @$foo[3] parse as (@$foo)[3] or @{$foo[3]}?
Seattle Perl Users Group Mailing List  
     POST TO: spug-list at pm.org
SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
    MEETINGS: 3rd Tuesdays
    WEB PAGE: http://seattleperl.org/

The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. 

More information about the spug-list mailing list