in reply to On quoting the lhs of '=>'
Instead of non-working '+' or offending '()', you could use '&' (only one character long and in the same place as '+' would have been if it worked).
Note also in perldoc (perl 5.8.8) ...
Unary "+" has no effect whatsoever, even on strings. It is useful syntactically for separating a function name from a parenthesized expression that would otherwise be interpreted as the complete list of function arguments. (See examples above under "Terms and List Operators (Leftward)".)
How about using Readonly already?
Later ... one more way to make a constant (sub) behave: $p = { (P) => 1 } where P is a constant (sub).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: On quoting the lhs of '=>'
by moritz (Cardinal) on Jul 09, 2008 at 11:56 UTC | |
by parv (Parson) on Jul 09, 2008 at 12:28 UTC | |
|
Re^2: On quoting the lhs of '=>'
by rovf (Priest) on Jul 09, 2008 at 11:54 UTC | |
by goibhniu (Hermit) on Jul 09, 2008 at 15:35 UTC |