Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Set Notation Handling

by tall_man (Parson)
on Mar 28, 2005 at 23:37 UTC ( #442994=note: print w/replies, xml ) Need Help??


in reply to Re^2: Set Notation Handling
in thread Set Notation Handling

Member testing is included in Set::IntSpan. Try this.
use strict; use Set::IntSpan; + my $set = new Set::IntSpan('1-4,6,9,12-18'); testvalue(3, $set); testvalue(7, $set); + sub testvalue { my $value = shift; my $set = shift; if (member $set $value){ print "$value is valid\n"; }else{ print "$value is invalid\n"; } }

Replies are listed 'Best First'.
Re^4: Set Notation Handling
by tradez (Pilgrim) on Mar 29, 2005 at 15:35 UTC
    That works perfectly! Thank you sooo much for your help!


    Tradez
    "Every official that come in
    Cripples us leaves us maimed
    Silent and tamed
    And with our flesh and bones
    He builds his homes"

    - Zach de la Rocha

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://442994]
help
Chatterbox?
[Corion]: choroba: Yeah, that's a lot of "fun" for one week...
[Corion]: I guess I should stage some product photos for Sane Dots Supplies ;)
[marto]: I had some ideas about that Corion
[marto]: I'll send a message over the weekend maybe :P
[Corion]: choroba: I avoided the "fun" of emergency shopping for a new flat iron by trying the flat iron without the timer that sat between it and the mains power. Seems as if just the timer is broken.
[Corion]: marto: Heh, would be cool!
Corion munches on the traditional German winter fruit, strawberries. Imported from Spain at the price of EUR 0.77 per 150g - not really cheap but surprisingly good for a winter produce

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-01-20 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.