in reply to Reading constant
update2 Ah. I see. Your problem is that qw// makes a list of strings, and the string "ABC" is not the same as the value of the constant named "ABC".
If you want to use a constant as an element in a list, don't use qw, use (), and make sure the constant is defined before you use it
use constant ABC => qw/wet ear rtf/; use constant HEAD => (ABC,"DEF","GHI"); print $_ for HEAD;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading constant
by kulls (Hermit) on Dec 09, 2006 at 13:30 UTC |