SPUG: Trouble using a hash

Michael R. Wolf MichaelRWolf at att.net
Thu Nov 20 06:24:18 CST 2003

"Curtis Lacy" <cel1 at ix.netcom.com> writes:

> Simple question which I hope someone will take the time to answer. 

I cannot reproduce your problem. Here's a test script that works
without errors when run normally and when run through the debugger.

Perhaps you could distill your code down to a minimal non-working
section and post it.



#! /usr/bin/perl -w

my %trackCircuit = ( Hol=>'SoCal', Aqu=>'NYRA' );

@LR = ("Hol");

$where = $trackCircuit{ $LR[0] };
print $where;
  DB<1> x $where
0  'SoCal'
  DB<2> x $trackCircuit{ $LR[0] }
0  'SoCal'
  DB<3> x $LR[0]
0  'Hol'
  DB<4> p $where
  DB<5> p $trackCircuit{ $LR[0] }
  DB<6> p $LR[0]

Michael R. Wolf
    All mammals learn by playing!
        MichaelRWolf at att.net

More information about the spug-list mailing list