in reply to Re: sortmd5 script
in thread sortmd5 script

You've used good variable names, but there are no comments.

I personally believe that this can (i.e. please don't think I'm claiming it necessarily is) just as good as it gets: if comments add nothing and the code is pretty much self explanatory, then one should plainly not add them.

you don't need either the exit or the __END__ at the end of your script.

While the unnecessary exit is very unperlish, I'm sorry to have to repeat myself (because I don't feel like going and have a Super Search but I'm sure I'd find tons of previous remarks of the same kind...) but __END__ is pretty much like a "bye" and pairs nicely with the "hello" given by the shebang line: this is a remark not of my own but heard from $Larry himself, and I pretty much was fond of it as soon as I heard it for the very first time.

--
If you can't understand the incipit, then please check the IPB Campaign.

Replies are listed 'Best First'.
Re^3: sortmd5 script
by parv (Parson) on Aug 15, 2008 at 00:47 UTC
    While the unnecessary exit is very unperlish [...] but __END__ is pretty much like a "bye" and pairs nicely with the "hello" given by the shebang line

    In order to actually write a "bye", exit is just as good as __END__ (with the difference of having no option of (perl) code after __END__).

      Exactly for that __END__ is more perlish... you put it and any text after, the text won't even be seen by the parser; text after an exit;, OTOH, must still be syntax-clean perl :-)
      []s, HTH, Massa (κς,πμ,πλ)