Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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} }


Comment on Re: Parsing output from the CSV file
Download Code

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 imbibing at the Monastery: (6)
As of 2015-07-04 02:02 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 (57 votes), past polls