[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Constants as array refs



Ronald J Kimball wrote:
> >   use constant CARRAY => [1, 2, 3, 4];
> 
> >   foreach (( CARRAY ))
> 
> foreach ('CARRAY')

on perl 5.005_03, this is still foreach ([1, 2, 3, 4]):

$ cat constant 
use constant CARRAY => [1, 2, 3, 4];

foreach (( CARRAY )) {
  print "$_\n";
}

$ perl -w constant 
ARRAY(0x80cdeb0)

--
Steve Lane <sml@zfx.com>

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe