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

sorry for my lack of info and thanks so much for your help, i will try the code you provided and submit questions.

basically the output file needs to have the following features:

List in ascending alpha order a-z, no quotations,even columns, inserts area code, inserts exchange prefix the same on all number unless specifically marked otherwise, as can be seen below where there is an exchange prefix specified.

so in other words the numbers that only show the 4 digit line number, need to all have the same 587 exchange prefix and 333 area code, the one in the example that has the different exchange prefix, that one needs to have the same area code of 333 as the others... hope this makes more sense!

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

    It does make sense, and I'm usually in the same boat as other Monks... we prefer people do actual research and testing. The only reason I went all out is because I now code in Python, so the rare chance while at the office I get to visit PerlMonks I take the opportunity to do a bit of work with Perl :)

    I'll leave it up to you how to sort and format (Google and perldoc are your friends). The numbers, if you checked my output, already does what you need. Again, your input was lacking, so depending on other situations, you'll have to edit the code to fit.

    Cheers,

    -stevieb

      I now code in Python
      I really feel sorry for you. ;-)

      Je suis Charlie.

        Programming never was in my job description until this new job, but about half of the work I did was coding (Perl) for the better part of 12 years. I absolutely love Perl.

        That said, I am really liking Python as well. Only been using it for about three months, but it was exceptionally easy to grasp, and I'm already doing most of the advanced things I've done in Perl with the new language.

        I find the 'everything is an object' to be very intuitive and handy. Perl6 has this model as well, but I don't think it's too far into the wild as of yet. I also like the fact how spacing is what separates blocks, and that very few line terminators and sigils are necessary (code looks cleaner and more streamlined).

        All in all, Perl is still and will always be my favourite, but I am finding that people who bash Python probably haven't given it a fair chance ;)

        -stevieb

        And I feel even more sorry for you for posting that. It shows just how insecure you really are.