Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Parsing output from the CSV file

by manorhce (Beadle)
on Feb 07, 2013 at 19:51 UTC ( #1017719=note: print w/replies, xml ) Need Help??


in reply to Parsing output from the CSV file

Use like the below it will parse the data and will create fields according

$csv = Text::CSV::Simple->new({ sep_char => q{,}, binary => 1 }); $csv->field_map( qw( field1 field2 field3 field4 ) ); my @objectlist = $csv->read_file($file_name); foreach my $data (@objectlit) { print $data->{field1}."field2",$data->{field2} }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2016-10-01 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (2 votes). Check out past polls.