Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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?
[choroba]: yes
[choroba]: oh wait, the new code doesn't run in 5.14?
[choroba]: so maybe the previous version worked in 5.24, too
[Discipulus]: nope
[choroba]: oh ok
[choroba]: so, each character outside the \0 - \ffff range gets replaced by its name
[Discipulus]: the latest version works in 5.24 and not in 5.14. previous one worked on both but crashed on both with merry rabbit
[Discipulus]: yes: replaced by its name
Discipulus why Win32 must exists?!?!
[choroba]: If you want rabbits and poo, install cygwin

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2017-09-19 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (218 votes). Check out past polls.

    Notices?