Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Parsing data into an Array of Hashes

by jonadab (Parson)
on Sep 18, 2003 at 13:04 UTC ( #292376=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    my @stuff;
    while (<FILEHANDLE>) {
      push @stuff, { map {split /\s*=\s*/} split /,\s*/ }
  2. or download this
    my @stuff;
    while (<FILEHANDLE>) {
      my %record = map {split /\s*=\s*/} split /,\s*/;
      push @stuff, \%record;
  3. or download this
    my @stuff;
    while (<FILEHANDLE>) {
      my %record = @keysandvalues;
      push @stuff, \%record;
  4. or download this
    split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://292376]
[Discipulus]: but now fuel is cheap and they still make some war.
[Discipulus]: capitalism is able to go to war by cycle, even.
[shmem]: some? are you jokin' ?
[shmem]: fuel is only one fuel that fuels the fools... it is all about power and control - which NOBODY will have.
[shmem]: ...can't have, since silly

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2017-04-29 22:05 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (534 votes). Check out past polls.