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

Re: Delete unmatched quotes from a delimited file?

by bwana147 (Pilgrim)
on Jul 24, 2001 at 20:02 UTC ( #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? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2022-01-28 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (73 votes). Check out past polls.

    Notices?