in reply to constant confusion
the constant pod gives use constant USERINFO => getpwuid($<); as an example, and then further goes to showperl -l -- use constant FOY => 1, 2, 3, 4; print for FOY; __END__ 1 2 3 4
The pod saysList constants are returned as lists, not as arrays. $homedir = USERINFO[7]; # WRONG $homedir = (USERINFO)[7]; # Right
DESCRIPTION
This will declare a symbol to be a constant with the given scalar or
list value.
Seems pretty clear to me.
|
MJD says you can't just make shit up and expect the computer to know what you mean, retardo! I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests. ** The Third rule of perl club is a statement of fact: pod is sexy. |
|
|---|