rhxk has asked for the wisdom of the Perl Monks concerning the following question:
I want to build the if statement and at the time of execution, have something like$min = some number if defined $max = some number if defined $Files = some number $IdleTime = some number if (defined($max)) { $if = "($Files >= $max)"; } if (defined($min)) { if ($if) { $if .= " || ($IdleTime >= $min)"; } else { $if .= "($IdleTime >= $min)"; } }
I know this can be done ('cause I did it some years ago & I've grown old & senile)if ({$if}) { print "hi"; } else { print "hello"; }
...any help would be greatly appreciated...thanx...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: a not so complex if statment
by ikegami (Patriarch) on Jun 28, 2005 at 21:39 UTC | |
|
Re: a not so complex if statment
by GrandFather (Saint) on Jun 29, 2005 at 03:44 UTC | |
|
Re: a not so complex if statment
by ambrus (Abbot) on Jun 29, 2005 at 08:16 UTC | |
|
Re: a not so complex if statment
by fmerges (Chaplain) on Jun 28, 2005 at 22:09 UTC | |
|
Re: a not so complex if statment
by Anonymous Monk on Jul 01, 2005 at 20:08 UTC |