Ryszard has asked for the wisdom of the Perl Monks concerning the following question:
I've been hacking at a bit of code for a bit now and am pretty well (brain faded) stumped. I'm getting an "not an array reference at line <line>" error.
i'm getting the error when attempting to work out if one number is greater than anotherlines 1 and 2 (above) evaluate to 5, 7 respectivley.1) print "email: ${$self->{_product}}->[0]{EMAIL} \n"; 2) print "total: (scalar(keys %{$self->{_alllogins}}))\n"; 3) if ( ${$self->{_product}}->[0]{EMAIL} > (scalar(keys %{$self->{_al +llogins}})) ) {
to no avail. I just cant work out why, when i reverse the condition, the error message goes away. I'm using 5.005_03. Someone please tell me i've got a wet fish problem here... :-)1) my $allowable = scalar( ${$self->{_product}}->[0]{EMAIL}); 2) my $current = (scalar(keys %{$self->{_alllogins}})); 3) if ($current ge $allowable) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with le and gt
by Ryszard (Priest) on Sep 13, 2001 at 10:29 UTC |