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 ( #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
Node Status?
node history
Node Type: note [id://588791]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-10-23 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (234 votes). Check out past polls.

    Notices?