How can I use a "constant" as a hash key?

$ perl -e 'use constant CAT=>A;
> $hash{CAT} = q{Bobby};
> $hash{"CAT"} = q{Muffy};
> $hash{'CAT'} = q{Fluffy};
> $hash{qq{CAT}} = q{Tuffy};
> print "$_ = $hash{$_}\n" foreach (keys %hash);'
CAT = Tuffy
$

Want...

A=Bobby

John W Moon


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to