in reply to Re: total noob trying to format a phone list
in thread trying to format a list

thanks so much!!! i will try this and revert back. needs to be alphabetical and i need to use the same area code and exchange prefix unless a number has a different prefix, in which case i then need to filter that exchange prefix.

Replies are listed 'Best First'.
Re^3: total noob trying to format a phone list
by jeffa (Bishop) on Apr 24, 2015 at 18:29 UTC

    You are welcome. You can sort within this code, or you could just use sort utility from the shell:

    $ perl 1124590.pl Black, Joe (333)-321-0987 Smith, Sue (333)-321-0534 Brown, Andy (333)-587-0986 Smith, Pam (615)-895-1010 $ perl 1124590.pl | sort Black, Joe (333)-321-0987 Brown, Andy (333)-587-0986 Smith, Pam (615)-895-1010 Smith, Sue (333)-321-0534

    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)