Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://64786]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2017-08-20 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (317 votes). Check out past polls.

    Notices?