Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Making a hash of arrays from a datafile

by redbeard (Beadle)
on Oct 19, 2004 at 22:00 UTC ( #400680=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    1,2
    1,3
    ...
    2,3
    2,5
    2,5
    
  2. or download this
      local %DATAHASH;
      open (DATA, 'foo.csv');
    ...
          my @datarow=split(/,/, $_);
          push(@{$DATAHASH{$datarow[0]}}, ($datarow[1]));
      }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://400680]
Approved by traveler
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2021-05-09 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (102 votes). Check out past polls.

    Notices?