in reply to constant not evaluated
is (functionally) identical to the codeuse constant EARL => 'MEL';
sub EARL () { 'MEL' }
The problem is that you're using it in a stringifying context - the left-hand side of the => operator. Try the following:
And see if it does what you want.my $b = { EARL() . HARRIS() => 55 };
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: constant not evaluated
by Roy Johnson (Monsignor) on Sep 20, 2004 at 19:08 UTC | |
|
Re^2: constant not evaluated
by esharris (Monk) on Sep 20, 2004 at 19:17 UTC |