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

Re: Delete unmatched quotes from a delimited file?

by wine (Scribe)
on Jul 24, 2001 at 20:27 UTC ( #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? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-01-23 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?