Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Range Issue with RegEx

by TedPride (Priest)
on Jul 10, 2006 at 18:36 UTC ( #560197=note: print w/replies, xml ) Need Help??


in reply to Range Issue with RegEx

Or create a hash lookup for your range and then compare it to the numbers. This is probably the best method if your data file is very large and/or your range is large.
$h{$_} = () for (500, 501, 502, 531, 532); while (<DATA>) { chomp; print "$_\n" if exists $h{$_}; } __DATA__ 500 501 502 503 504 508 522 531 532 505

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://560197]
help
Chatterbox?
[1nickt]: The Google-fu is strong with this one.
[1nickt]: I was looking at Best Buy since like the in-store return/repace plan ... but the 17" HP Envy they have is not this one ....
[1nickt]: May be brand new ... 0 reviews on the site.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2017-03-26 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.