Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Test if list is range

by Kenosis (Priest)
on Sep 29, 2012 at 15:05 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://996391]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found