note
buckaduck
I think you mean the first <i>10</i> digits are the phone number, not the first <i>7</i>.
<p>
If you can assume that the first 10 digits are the phone number, and the remaining digits are the extension (which is a big assumption):
<p>
<code>
# Get rid of all non-digits
$number =~ s/\D//g;
# Break the number into groups of digits
my $phone = substr($number,0,10);
my $extension = substr($number,10);
</code>
<p>
buckaduck
157483
157483