Problems? Is your data what you think it is? | |
PerlMonks |
Re: Evaluating Multidimensional Arrays and Referencesby bikeNomad (Priest) |
on Aug 10, 2001 at 19:48 UTC ( [id://103919]=note: print w/replies, xml ) | Need Help?? |
The problem is that the @{...} returns an array. When you compare this with "John", it gets converted into a scalar, which is the size of the array (probably 1 in this case). So you're saying 'if 1 eq "John"'... The reason that it prints is that its contents are being interpolated into the string (separated by $, but that doesn't matter if you have one element). What you probably want is to say:
In Section
Seekers of Perl Wisdom
|
|