in reply to How do I parse a telephone number?

( undef, $areacode, $exchange, $line ) = $phn =~ m|(1-)?\(?(\d{3})\)?-?(\d{3})-(\d{4})|;
You might want to do a little more error-checking on the number, but that's the idea.