Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my (%pal, $key_pal, $data, %key_pal, $pal); open (FILE, "< pal.txt") || print "There is no PAL file here"; while ( my $line = <FILE> ) { chomp $line; $key_pal, $data = split ",", $line; $key_pal{$pal} = $data; }
if ($pal{$key_pal} eq $my_item) { ...some code here}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash Problem
by matija (Priest) on Mar 05, 2004 at 20:15 UTC | |
|
Re: Hash Problem
by Limbic~Region (Chancellor) on Mar 05, 2004 at 20:13 UTC | |
|
Re: Hash Problem
by maa (Pilgrim) on Mar 05, 2004 at 20:18 UTC | |
|
Re: Hash Problem
by neniro (Priest) on Mar 05, 2004 at 20:39 UTC | |
by Wonko the sane (Curate) on Mar 05, 2004 at 23:03 UTC | |
by Anonymous Monk on Mar 05, 2004 at 21:04 UTC |