laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
First,
<rant> warnings and strict are for catching problems at this very stage of development The very first thing you should type in any perl program is.. If you were going to add or remove strict or warnings, that would be after the code was frozen. </rant> OK.. your issue: I think you're trapped by the notion that you have to use a regex to match that number. You don't. You do need one to capture it though. Why not just capture it to $1 or $2 or whatever it happenes to be in the pattern match and then use what was designed for this very thing... a hash. Store all of your cell site codes as the key and whatever is associated with that as the value. Then just do a .. Or whatever you want to do with $1.
Hope this helps..
In reply to Re: Can I match a range from an array?
by rchiav
|
|