[Chicago-talk] Using "@" to reference element in array
tigerpeng2001 at yahoo.com
Thu Oct 1 15:07:27 PDT 2009
@array is just an array with one element. ('a') ; and print prints out the element.
From: Jay Strauss <me at heyjay.com>
To: Chicago.pm chatter <chicago-talk at pm.org>
Sent: Thu, October 1, 2009 4:42:09 PM
Subject: [Chicago-talk] Using "@" to reference element in array
I just got a script at work where the writer used:
my @array = qw[adf af a adf asdfd];
And it works!!
I thought that notation didn't go into effect until Perl6.
I've always done $array, and never tried the style above. Is there any reason not to adopt the style above in future Perl5 programming?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chicago-talk