Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: File Parsing REGEX

by nite_man (Deacon)
on Feb 11, 2004 at 13:26 UTC ( [id://328253]=note: print w/replies, xml ) Need Help??


in reply to File Parsing REGEX

Try to look at Text::CSV.

Also, if all fields within CSV are surrounded by double-quotes, you can use this pattern:

open CVS, '/tmp/file.cvs' or die "Cannot open CVS file: $!"; while(my $row = <FILE>) { my ($name, $email, $text) =~ m!\,?\"(.*?)\"\,?!g; # do something } close CVS;

~ Schiller

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-25 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found