Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Getting columns from csv file in perl

by johngg (Abbot)
on Apr 24, 2007 at 14:43 UTC ( #611749=note: print w/replies, xml ) Need Help??


in reply to Re^3: Getting columns from csv file in perl
in thread Getting columns from csv file in perl

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://611749]
help
Chatterbox?
[Corion]: There is demand for an emergency Frankfurt.pm social meeting, as two people from Strasbourg.pm are in Frankfurt on Wednesday - I'll forward the mail in the evening
[Discipulus]: beer finished in Strasbourg? ;=)
[Corion]: Discipulus: Yeah, or it got too warm and they hope for colder beer here ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2018-07-23 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?