This was just my attempt to point out that what may superficially seem to be a simple problem, in fact is not.

Formatting phone numbers is not simple.
Formatting 10 digit numbers is simple though.

The poster did specifically mention phone number in the node, so I took the chance to point out that he might be tackling a problem quite a bit larger than he originally intended. You do have to remember that there is a world outside your local pond, and sometimes it can crawl up on you and disturb your nice schemes.

If (and only if) you are certain that all the phone numbers you will have to work with (now and in the future) are exactly 10 digits, then the 10 digit formatting assumption holds. I just don't think that the assumption holds - as my phone number is just 8 digits.


In reply to Re: Re: Re: formatted phone number from variable by htoug
in thread formatted phone number from variable by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.