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

Re^3: Getting columns from csv file in perl

by Joost (Canon)
on Apr 24, 2007 at 14:17 UTC ( #611742=note: print w/ replies, xml ) Need Help??

Comment on Re^3: Getting columns from csv file in perl
Download Code
Re^4: Getting columns from csv file in perl
by johngg (Abbot) on Apr 24, 2007 at 14:43 UTC
    my @data = map { [split /,/] } <>;

    You might want a chomp in there to avoid leaving the line terminator in the last field.

    my @data = map { chomp; [split /,/] } <>;

    I second your *sigh* by the way.

    Cheers,

    JohnGG

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-09-17 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (81 votes), past polls