http://qs321.pair.com?node_id=99392


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.