Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: how to check if a number falls in a range?

by almut (Canon)
on Mar 14, 2010 at 20:23 UTC ( #828608=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    42 is between 40 and 100
    99 is between 40 and 100
    111 is not between 40 and 100
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    [42 99] is within [40 100]
    [83 120] is not within [40 100]
    [101 111] is not within [40 100]
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2016-09-25 10:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (469 votes). Check out past polls.