Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Reading constant

by MaxKlokan (Monk)
on Dec 09, 2006 at 13:04 UTC ( [id://588791]=note: print w/replies, xml ) Need Help??


in reply to Reading constant

If you define HEAD as a constant, then you cannot change it anymore because it is, indeed, a constant. "ABC" is a string and it is its first element.
If you first define the constant ABC and then the constant HEAD, then you can do the following:
use strict; use warnings; use constant ABC=> qw/wet ear rtf/; use constant HEAD => ABC,qw/DEF GHI/; print $_ foreach(HEAD);
Is this what you wanted?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://588791]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found