[Melbourne-pm] The || operator
Alfie John
alfiejohn at flamebait.org
Mon Oct 31 14:27:58 PST 2005
Hi (),
Quick question:
@a = (4,5,6) || (7,8,9);
use Data::Dumper;
print Dumper[@a];
I would have thought @a would have contained (4,5,6). Looking through
perlop, it says that this is the wrong way to use || and what would
happen is:
@a = scalar( (4,5,6) ) || (7,8,9);
and thus @a would contain 3. But this is wrong too.
In fact, @a contains (6).
Any thoughts?
Alfie
More information about the Melbourne-pm
mailing list