iphone has asked for the wisdom of the Perl Monks concerning the following question:
I have a block of statements that need to be executed everytime in my code,but when a command line option,say "c" is passed,this block of statements need to be executed based on an "if" condition,is there a way I can achieve this without doing "if else"?
if (grep( /$number/, @list))# this if should come into the picture onl +y when command line option c is given, { #Block of statements... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Executing data based on command line arguments
by ELISHEVA (Prior) on Dec 15, 2010 at 07:35 UTC | |
|
Re: Executing data based on command line arguments
by PeterPeiGuo (Hermit) on Dec 15, 2010 at 04:15 UTC | |
|
Re: Executing data based on command line arguments
by eff_i_g (Curate) on Dec 15, 2010 at 04:33 UTC | |
by iphone (Beadle) on Dec 15, 2010 at 04:46 UTC | |
by Anonymous Monk on Dec 15, 2010 at 05:33 UTC | |
by johna (Monk) on Dec 15, 2010 at 14:42 UTC |