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

Re: Delete unmatched quotes from a delimited file?

by wine (Scribe)
on Jul 24, 2001 at 20:27 UTC ( [id://99392]=note: print w/replies, xml ) Need Help??


in reply to Delete unmatched quotes from a delimited file?

bwana147 has the right solution. I only want to add that your code has some strange things in it.

while (<>) { split /\|/; # Use of implicit split to @_ is dep +recated my $output = "|"; foreach my $value (@_) { if ($value =~ m/"{1}/) { # equivalent to /"/, so does not do +any counting $value =~ s/"//g; } $output =. $value . "|"; # should be .= } print $output; }

Couldn't help to mention it. ;) Good luck.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found