powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
Now I get this error:$_lfile = param("lfile"); # Get the contents via copy n paste $_lfile2 = $_lfile; # Make a temp variable ($_line1,$lfile2) = split /\015\012/, $_lfile2, 2; # Split by line bre +aks in windows format while($_line1 =~ /\"/) { # Check if this line contains quote ($_line1,$_extraLine1) = split /\"/, $_line1, 2;# Split by Quote if($_extraLine1 =~ /\"/) {#If contains another then spolit again ($_extraLine1,$_extraLine2) = split /\"/, $_extraLine1, 2; }# End the check to see if contained another quote. $_extraLine1 =~ s/\,/g;#Now strip out the comma's in the field bet +ween the quotes. $_line1 = "$_line1$_extraLine1$_extraLine2";# Now replace the line + contents, without the quotes and extra comma's }# End while statement
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checking if line contains a quote
by reneeb (Chaplain) on Sep 08, 2005 at 07:51 UTC | |
by Anonymous Monk on Sep 08, 2005 at 14:13 UTC | |
|
Re: Checking if line contains a quote
by salva (Canon) on Sep 08, 2005 at 08:21 UTC | |
|
Re: Checking if line contains a quote
by liverpole (Monsignor) on Sep 08, 2005 at 11:07 UTC |