Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Re: how do I sort on two fields in a hash table?

by larryl (Scribe)
on Mar 16, 2001 at 01:16 UTC ( #64786=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: Re: Re: Re: how do I sort on two fields in a hash table?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://64786]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2014-09-19 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls