Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^5: Joining multiple lines together while parsing

by haukex (Archbishop)
on Mar 24, 2017 at 11:33 UTC ( [id://1185765]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Joining multiple lines together while parsing
in thread Joining multiple lines together while parsing

so I can use it for csv?

Use Text::CSV:

use Text::CSV; my $csv = Text::CSV->new({binary=>1, always_quote=>1, blank_is_undef=>1, eol=>$/, auto_diag=>2}); $csv->print(select, ['foo', 'bar']); __END__ "foo","bar"

Replace the call to select with a $filehandle (open) if you're writing to a file.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-18 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found