in reply to Re: Re: Re: how do I sort on two fields in a hash table?
in thread how do I sort on two fields in a hash table?
They do the same thing, it's all about operator precedence.
|| has higher precedence than or,
and other things in between.
The perlop manpage has about everything you need to know.
To steal an example from perlop, the following:
unlink "alpha", "beta", "gamma" or gripe(), next LINE;
works like:
unlink("alpha", "beta", "gamma") or (gripe(), next LINE);
but it would break using ||, because it would
work like:
unlink("alpha", "beta", ("gamma" || gripe()), next LINE;
|
---|
In Section
Seekers of Perl Wisdom