Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: reading file in Hash

by codeacrobat (Chaplain)
on May 07, 2009 at 21:25 UTC ( #762704=note: print w/replies, xml ) Need Help??


in reply to reading file in Hash

lets golf.
perl -e 'print<<EOF 1 2 3 a b c d e f g h i EOF ' | perl -MData::Dumper -lane '1==$. and @h=@F and next;my $i; push @ +{$v{$h[$i++]}},$_ for @F}{print Dumper(\%v)'

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Replies are listed 'Best First'.
Re^2: reading file in Hash
by Anonymous Monk on May 08, 2009 at 15:06 UTC
    did you say "golf" and "my" in the same sentence?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2021-09-16 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?