Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: arranging the csv file

by hdb (Prior)
on Jul 24, 2013 at 07:03 UTC ( #1046021=note: print w/ replies, xml ) Need Help??


in reply to Re^2: arranging the csv file
in thread arranging the csv file

Marrying your and Loops' approach:

use strict; use warnings; my %data = map { /(.*?)\s*,/ => $_ } <DATA>; print @data{ qw( 10.1 100.1 25.1 103.1 ) }; __DATA__ 100.1,A ,25, 36,56,89,45,36,56 25.1 ,B,232,565,65,56,56,48,25 103.1,C,25,5,6,9,4,5,56,889,9 10.1,D,5,6,5,8,9,8,12,23,36,6

Question: can anyone do this as a oneliner without a named hash?


Comment on Re^3: arranging the csv file
Download Code
Replies are listed 'Best First'.
Re^4: arranging the csv file
by Anonymous Monk on Jul 24, 2013 at 07:13 UTC

      Actually, I was not able to do it, and I have been experimenting with various types of sigils and parentheses for a while. Many thanks!



Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2015-07-31 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls