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!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||