We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Not sure what you mean by "quick". Do you want an equally succint, but more "English" way of expressing conditions? Or do you want to type even fewer characters than the expressions you have already provided? If "even shorter" is your goal, then I'm afraid you would lose clarity. Though some golf expert is sure to point the way to "even shorter", I wouldn't use that in production code. If "just as short but more English" is the goal, then I would say, your question is a little like asking "Is there a fast way to say 'Je ne sais pas' in French, without actually saying 'Je ne sais pas'?" Every language, even a programming language, has its idiom. The expressions you have written are the idiom of Perl, as much as 'Je ne sais pas' is the idiom of French. Best of luck and welcome to Perl Monks (and Perl), beth Update:Citromatik saw an angle to your question that I missed. In the spirit of Citromatik's answer below, a pre-Perl 5.10 equivalent is Update: as per Kyle. In reply to Re: conditional syntax options
by ELISHEVA
|
|