Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Once AGAIN perl saved my bacon

by Anonymous Monk
on Nov 20, 2002 at 05:37 UTC ( #214361=note: print w/ replies, xml ) Need Help??


in reply to Once AGAIN perl saved my bacon

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!


Comment on Re: Once AGAIN perl saved my bacon

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://214361]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-07-12 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (239 votes), past polls