in reply to How do I parse a telephone number?

The only CPAN module that comes close to addressing the problem in a comprehensive way is the Number::Phone family of classes. They do a lot more than mere parsing; you may be particularly interested in their format method.