in reply to Help with regEX

Your original regex's problem is that you have [^a-z] which matches any character EXCEPT lowercase letters. Anyway, taking your working solution, sure you can do it without destroying the original string. ($number) = $string =~ /(\d+)/, presto.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart