Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Matching string containing values between 0 and 100 inclusive

by poolpi (Hermit)
on Mar 17, 2009 at 10:57 UTC ( #751148=note: print w/ replies, xml ) Need Help??


in reply to Matching string containing values between 0 and 100 inclusive

Are you dealing with set of integers?

#!/usr/bin/perl -w use strict; use Set::IntSpan; my ($run_list, $set, $n); $run_list = '0-100'; $n = 13; eval { $set = new Set::IntSpan $run_list }; $@ and print "$@: bad run list\n"; member $set $n and print "$n is a member of my set\n";


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb


Comment on Re: Matching string containing values between 0 and 100 inclusive
Download Code
0 replies Replies are listed 'Oldest First'.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (20)
As of 2015-07-07 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls