Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Delete unmatched quotes from a delimited file?

by bwana147 (Pilgrim)
on Jul 24, 2001 at 20:02 UTC ( [id://99386]=note: print w/replies, xml ) Need Help??


in reply to Delete unmatched quotes from a delimited file?

I guess you can count the number of quotes and add one if it's missing. This assumes you can't quote pipes. Something like this might do:

while ( <> ) { my @F = split /\|/; foreach ( @F ) { $_ .= '"' if tr/"// & 1; } print join '|', @F; }

--bwana147

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-24 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found