Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Hash Problem

by maa (Pilgrim)
on Mar 05, 2004 at 20:18 UTC ( [id://334351]=note: print w/replies, xml ) Need Help??


in reply to Hash Problem

Have you got your variable names right??

my %pal=(); while ( my $line = <DATA> ) { chomp($line); my($palkey, $data) = split (",", $line); $pal{$palkey} = $data; } while (my($key, $value) = each %pal) { print "$key=>$value\n"; } __DATA__ 297220,ITEM 207420,NEW 222222,OLD

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://334351]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found