lerameur wrote:
hello, I have a small function using lenght, I am getting the
following error:
Use of uninitialized value in length at ./count2.pl line 95, <
$wordlisting1> line 1.
while (my $line = <$wordlisting1> ) {
if ($line =~ m/backlog/ ) {
my @items = (split(/,/,$line))[0..88];
if (length($items[86]) == 0){
$counter++;
}
}
}
anybody know why ?
Because $items[86] is undefined. Maybe you want:
unless ( $items[86] ) {
$counter++;
}
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/