in reply to Re: Easy Things
in thread Easy Things
I do think the use of perl -es is a big domain of sys admins and less for CGI programmers. That doesn't mean they can be any less useful for CGI / OO programmers. (Note, I am using the term perl -es liberally and to refer to any quick and dirty script that makes work lighter and can be thrown away -- but saves quite a bit of time).
To give you a good example, one of my clients got bought out, and wanted me to change widgetscorp.com to widgetscorpinternational.com, and "Widgets Corp., Inc." to "Widgets Corp. International, Inc., A Subdivision of International, Inc." within all of their web pages and CGI scripts on their site. (Several hundred pages combined, not all of which I had done. They however wanted me to change it all under the technical support I was supposed to give them for the site.).
Now I really wanted to keep them as a client, even though I would have had every right to tell them that something of this magnitude was outside the scope of the contract. (I mean, there wasn't anything wrong with the CGI scripts I had written, i.e. bugs, and it wasn't my fault they were bought out!) But, the idea of going through all of their web pages and scripts -- even doing a search and replace -- to change them didn't thrill me either, even if I were to be paid for it because it was grunt work.
Enter Perl and File::Find to the rescue. 5 minutes and I had a script to traverse an arbitrary directory, run an s/widgetscorp\.com/widgetscorpinternational\.com/sgi, and I looked like a hero. Even better, I could e-mail them a copy of the script, and then they could use it internally on their files.
Needless to say they were tickled pink for 5 minutes of my time -- which was well spent because it helped cement my relationship with Widgets Corp International when they were being shaken up.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Easy Things
by hardburn (Abbot) on Jan 26, 2004 at 17:19 UTC | |
by l2kashe (Deacon) on Jan 28, 2004 at 20:27 UTC | |
by hardburn (Abbot) on Jan 28, 2004 at 20:51 UTC | |
|
grep, map, and perl -i -pe
by Anonymous Monk on Jan 31, 2004 at 22:30 UTC |