hello friends,
I have a question in perl programming.
I am trying on a logic where i have to ignore "'" (apostrophe) in a array.
Here is my code:
*************
sub func { my ($value) = @_ ; if($value =~ s/\'//) { $value = "'".$value."'"; } }
************
This works fine if the data in a column is :
&&&&&&&&&&&&&&
hello Ron, welcome to Itn'l ariport
&&&&&&&&&&&&&&
but giving ORA-01756: quoted string not properly terminated
error if the data is
&&&&&&&&&&&&&&
he'llo Ron, welco'me to Itn'l ariport
&&&&&&&&&&&&&&
so i tried something like this
*************
sub func { my ($value) = @_ ; if($value =~ /\'/) { if($value[$i] = 0; $value[$i] <= length($value); $value[$i]++) { if($value =~ s/\'//); } $value = "'".$value."'"; } }
************
actually i am trying to ignore "'" (apostrophe) in a array. since i am not getting the logic atleast i am trying to replace it with nothing.
i am getting syntax errors here.
I am learing perl. Any help would be greatly appreciated.
regards,
Code tags and formatting to match OP's intent added by davido
In reply to how to ignore ' in an array by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |