in reply to Re: obtaining the three leftmost characters of a string
in thread obtaining the three leftmost characters of a string

You can combine the last two lines:
my ($first_three) = $phone =~ /(\d{3})/;

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)