Hi Rajeev,

please acknowledge you have received and read this message.

On Sat, 3 Sep 2011 15:47:42 -0700 (PDT)
Rajeev Prasad <rp.ne...@yahoo.com> wrote:

> ...
> ...
> 
> $k=1;
> my $arSZ = @tmpAR=split(/"/,$line);
>     for $x (0..$arSZ-1){
>     if ($x % 2 == 0) {
>     push(@modline,"$tmpAR[$x]");
> 
>     } else {
>     my $count = $tmpAR[$x-1] =~ tr/,/,/;        #try for something more
> correct like...  =~ m/\,/g); $k = $k + $count;
>     push(@modline,"STRING.$k");
>     }
> 

This code exhibits a lot of the bad elements I've commented about here:

http://www.nntp.perl.org/group/perl.beginners/2011/09/msg118526.html

Have you read that message and the
http://perl-begin.org/tutorials/bad-elements/ link? If so, why do you continue
writing such bad code?

Regards,

        Shlomi Fish

> print @modline;
> ...
> ...
> 
> 
> this replaces fields in quotes with STRING-field number.
> 
> 
> 
> 


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
"The Human Hacking Field Guide" - http://shlom.in/hhfg

In the Technion, there are many ways to get from one place to the other, but
they are all the same length.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to