How to write USEFUL Perl code (was: Re: [hackers-il] Re: How to...)
- On Mon, 13 Aug 2001, Shlomi Fish wrote:
> Actually, it usually is a good ideato use filehandles such as IN, OUT,[... rest of discussion was snipped, especially as I saw no explanation
> FILE, etc. It is always possible to duplicate STDIN into one such
> filehandle. (I think the syntax is open IN, "<&STDIN";). In any case, the
> FileHandle module is also a good idea, as is the Socket module.
how using filehandles *really* makes perl scripts easier to
OK, it seems that Shlomi's thread is destined for diversions regardless of
any goodhearted attempts to do otherwise...
The current diversion starts with the questions:
1. How do you actually use 50-line perl scripts (or programs) for?
2. What writing style of 50-line perl scripts would make it easier for you
to use such scripts for whatever you actually use them for?
> I'm not sure I'd like to focus on scripts in my documnt. I'd like to giveHere is the reason for the current diversion: Shlomi wants
> advice for writing legible, maintainable perl code, whether in a module or
> in a script.
legible&maintainable perl code. I want just to get my job done today and
in the future. I believe that for this purpose, remembering to read from
stdin (or from <> - which I personally don't like, because it complicates
for me command line arguments handling and validation - no religious
argument here please - it is matter of taste for me) - is more important
than using alternative filehandle names (see above).
Does Anyone disagree with me?
If yes, what are his/her reasons?
There is no IGLU Cabal. Freedom of expression was suppressed there at a
whim, and people stopped discussing the important issues.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html