"I've had several 'trivial' scripts grow well beyond thier original intent."
I continually find myself fending off the implicit patina of triviality assigned to Perl by users, evoked by the word 'script' (further bolstered by the impression, however accurate, that Perl is to UNIX what Visual Basic (et al) is to Windows).
Nearly all the so-called 'one-off's I've ever written have somehow wound up either running in Production, or at least used on a regular basis ('soft' production, as it were). It has reached the point where I no longer use the word 'script' to refer to them when speaking to users, instead using the more substantive, 'program.'
Toward that end I try ALWAYS to write my scripts/programs, however trivial, as though they are full-fledged applications (or soon will be). Which is to say I eschew globals, at the expense of passing values to subroutines more than perhaps efficiency would dictate.
dmm
If you GIVE a man a fish you feed him for a day
But, TEACH him to fish and you feed him for a lifetime
| [reply] |
There are very few reasons to not do things the right way. If it's no skin off your back, then don't cut corners.
"Shortcuts make for long journeys."
------ We are the carpenters and bricklayers of the Information Age. Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. | [reply] |