Constant not working in hash...

2008-04-04 Thread pisces . philip
use constant PART_NUMBER=> 'P/N'; print PART_NUMBER; The above prints, "P/N", as I would expect. Later in the script I want to access a hash value using the constant like this: my $part = $parts{ $key }{ PART_NUMBER }; <- this doesn't work, but this does: my $part = $parts{ $key }{ '

Re: Constant not working in hash...

2008-04-05 Thread pisces . philip
On Apr 4, 9:37 am, [EMAIL PROTECTED] (Jeff Pang) wrote: > On Fri, Apr 4, 2008 at 11:42 PM, <[EMAIL PROTECTED]> wrote: > > use constant PART_NUMBER=> 'P/N'; > > > print PART_NUMBER; > > > The above prints, "P/N", as I would expect. Later in the script I > > want to access a hash val

Re: Constant not working in hash...

2008-04-05 Thread pisces . philip
On Apr 4, 10:30 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > [EMAIL PROTECTED] wrote: > > use constant PART_NUMBER=> 'P/N'; > > > print PART_NUMBER; > > > The above prints, "P/N", as I would expect. Later in the script I > > want to access a hash value using the constant like this: > > m