Where do you want *them* to go today?#!/perl/bin/perl use strict; use warnings; # The assumption is that the number will always be exactly ten digits my $s = "0123456789"; print $s, "\n"; $s =~ s/^(\d{3})(\d{3})(\d{4})$/($1)$2-$3/; print $s, "\n"; __OUTPUT__ 0123456789 (012)345-6789
In reply to Re: formatted phone number from variable
by thezip
in thread formatted phone number from variable
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |