On May 27, 11:09 am, robertmorales...@gmail.com (Robert Morales)
wrote:
> Ok, now I added the:
>
>        my $regex = "^((?!total).)*\$";
>

Using the 'qr' operator is a more efficient option
(see "Regexp Quote-Like Operators " in perlop)
and will take care of the $:

my $regex = qr/^((?!total).)*$/;
...
if ( $line =~ /$regex/ )
> I also removed the " " from the numbers in the if test:
>
>         if ($array[6] >= 867580){
>
> The error msg I get this time, is like this:
>
> r...@user# ./script.pl
> 0
> Use of uninitialized value $array[6] in numeric ge (>=) at ./script.pl line
 ./script.pl line

Looks like $array[6] is undefined.  Are you sure the split
always generates that many fields...?  Do you need to
refactor the code ..?


--
Charles DeRykus


--
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