[Melbourne-pm] The || operator
david_dick at iprimus.com.au
Mon Oct 31 14:34:07 PST 2005
Alfie John wrote:
> @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?
extreme gratitude that it's not me responsible for debugging that code? :)
More information about the Melbourne-pm