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

RE: [FWP] Constants as array refs




> if you run this with -w, you get a hint:
>
>    Ambiguous use of @{CARRAY} resolved to @CARRAY at constant line 3.

Yeah, I got that "hint", but apparently it needed to be larger and more
2x4-shaped...

>
> so:
>
>    foreach (@{ CARRAY() })
>
> works, but i bet someone can come up with a better solution.

The only other nominee is

    foreach (@{ +CARRAY })

Dunno which I like better... I've always been attracted to the idea of 'use
constant', but the syntactical sugar is certainly lacking (IMO).

----
"It is the customary fate of new truths to begin as heresies and end as
superstitions."
--Thomas Huxley
___________
Jeff Boes  <><  jboes@qtm.net
Mur Consulting  http://www.qtm.net/~jboes/


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