Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Think about Loose Coupling
 
PerlMonks  

Re^2: Regex with malformed CSV files

by ickyb0d (Monk)
on Jan 10, 2006 at 15:14 UTC ( [id://522305]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Regex with malformed CSV files
in thread Regex with malformed CSV files

Thanks for the info! Here's what i ended up doing using Text::CSV_XS

while(!($csv->parse($line)) || $csv->fields < $COLUMNS) { $line =~ s/\r//g; $line =~ s/\n$/=0D=0A/; $line .= <IN>; }


So while it's an invalid line (csv->parse) or the number of fields (csv->fields) isn't equal to the number of colums... it just keeps grabbing lines.

Thanks again!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522305]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.