Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Making a hash of arrays from a datafile

by allolex (Curate)
on Oct 19, 2004 at 22:42 UTC ( #400689=note: print w/replies, xml ) Need Help??


in reply to Making a hash of arrays from a datafile

In addition to borisz's remarks, you should probably be a little more careful with comma-separated values, which have bitten quite a few people. What happens to your data if one of your values contains a comma? Are you dealing with quotes? You can use Text::CSV to address this problem and others. Even if it doesn't apply to your test code, I hope it helps you in the future.

--
Damon Allen Davison
http://www.allolex.net

  • Comment on Re: Making a hash of arrays from a datafile

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://400689]
help
Chatterbox?
[Eily]: I just wrote a oneliner to solve a (non perl) colleague's problem, and it worked on the first try
[Eily]: and he wasn't impressed
1nickt adds gingersnaps to the platter on the sideboard.
[Eily]: sure it was a pretty standard one liner (of the $h{$1} = $2 if /regex/; END { pp \%h; } variety), but he's not supposed to know that!
[Eily]: what's the point of writing perl if people aren't impressed :P
[sierpinski]: Haha
[Discipulus]: i'm with you!

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-04-26 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (482 votes). Check out past polls.