>
> for ($i=0; $b[$i] != undef; $i++)
> {
> print STDOUT $b[$i];
> }
>
> and that seem logical but I was getting complaints such as..
> "Argument "#stopped at 867\n" isn't numeric in ne at ./page57_1.pl line
> 9, <FILEIN> chunk 1544."
>
> anyhow hope you can enlighten me as to all this hullaballooo ;-)

The operator != is meant for numeric values.
The operator ne is meant for non numeric values.
If you want to check for both try this:

for ($i=0; defined $b[$i]; $i++)
 {
 print STDOUT $b[$i];
}

It will just check if $b[$i] has a defined value, regardless of it being
numeric or non-numeric.
I would suggest to use the defined function rather then using an not-equals
operator with the value undef.
But be warned: An empty string counts as a defined value:

my $a;
print defined $a;
$a = '';
print defined $a;

Maarten.

Reply via email to