Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Test if list is range

by Kenosis (Priest)
on Sep 29, 2012 at 15:05 UTC ( #996391=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print 'The variable is ' . ( is123(@array) ? '' : 'not ' ) . '[1 .. 3]
    +.';
    
    sub is123 { @_ ~~ [ 1 .. 3 ] }
    
  2. or download this
    The variable is [1 .. 3].
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2016-06-29 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (384 votes). Check out past polls.