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
In reply to Re: Delete unmatched quotes from a delimited file?
by bwana147
in thread Delete unmatched quotes from a delimited file?
by Buckaroo Buddha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |