http://qs321.pair.com?node_id=401882


in reply to Command line tool coding style?

It took me a while to figure out what you were doing, but after a while I finally discovered. It looks nice, but... isn't it easier to create a hash with the possible $_actions?

Update: Hmm... it's an almost 3 years old thread. Should have checked that before posting.




"2b"||!"2b";$$_="the question"
Besides that, my code is untested unless stated otherwise.
One more: please review the article about regular expressions (do's and don'ts) I'm working on.

Replies are listed 'Best First'.
Re^2: Command line tool coding style?
by Aristotle (Chancellor) on Oct 24, 2004 at 03:55 UTC

    Using a hash would be the simple option, indeed, but leads to less generalized code. If I had to do something like this again, I'd do it precisely as perrin suggested.

    Makeshifts last the longest.