Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Here's the story of my first perl program...

I was talking to a co-worker of mine and she shows me this "project" (busy work) her boss had given her - A client had sent us about 2000 Word documents - one page each, full of tables filled with various bits of data. Her boss wanted the information from about 10 different fields on every document transferred to an Excel spreadsheet.

If that wasn't tedious enough, the Word documents were password protected and the text couldn't even be selected to copy and paste into a spreadsheet, and it wasn't possible to run a macro on it. She had been manually typing everything into the spreadsheet!

Now, I had just started to learn perl - my first programming language really, (besides some BASIC in the 80's) but I told her I'd give it a shot.

Since the Word docs were all created from the same template, each field was preceded by the same proprietary microsoft garbage. I opened some files in a hex editor and figured out some pretty nasty looking regular expressions to find the fields, then write them out to a csv file. I don't think it took much more than a minute for it to run through all the Word docs. Being my first program, it took me a few days to get it working well, but the project was still done 2 weeks ahead of schedule. I think my coworker ended up taking all the credit for it, but I got enough satisfaction out of creating something useful that actually worked.

I've been hooked on perl ever since!

In reply to Re: Once AGAIN perl saved my bacon by Anonymous Monk
in thread Once AGAIN perl saved my bacon by AcidHawk

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (3)
    As of 2014-09-17 00:45 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (55 votes), past polls