in reply to Regex: plucking numbers from a large string

Offhand, I'd say this calls for //g.
my @counts; # since there are only 10 possible values, all # digits, why use a hash? while($largeStr=~/Tel: 06(\d)/g) { $counts[$1]++ }
I removed the "+" from after the \d, since you really only expect one digit for your extensions, right?

After the loop is done, the @counts array should have the answers you're looking for.
--
Mike

Edit: Wow, foreach doesn't work, but while does. Wierd...