Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Command line tool coding style?

by muba (Priest)
on Oct 23, 2004 at 20:56 UTC ( #401882=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401882]
help
Chatterbox?
[holli]: bullshit. cents not $
[ambrus]: holli: wait, plastic or glass bottle?
holli switches OS
[holli]: Lidl only sells plastic
[Corion]: holli: Oooh, a twister top - so yes, that's a worse state of mind than it sounded ;)
[holli]: and since I outed myself anyway as a horrible person, to top it off, the bottle contains beer. alcohol free beer
[Discipulus]: nowaday such beers have also a good taste

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2017-09-25 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (280 votes). Check out past polls.

    Notices?