| Subject: | Re: Evaluate an operator given as a string |
|---|---|
| From: | peng.kyo@xxxxxxxxx (Peng Kyo) |
| Date: | Wed, 30 Jul 2008 22:49:45 +0800 |
| Newsgroups: | perl.beginners |
On Wed, Jul 30, 2008 at 10:43 PM, Amit Koren <koren.amit.perl@xxxxxxxxx> wrote:
> if ($x $sign $y) { # want it to be treated as: if ($x >= $y)
one way, change the line above to:
if (eval "$x $sign $y") {
...
}
--
Regards,
Jeff. - Peng.Kyo@xxxxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Evaluate an operator given as a string, Amit Koren |
|---|---|
| Next by Date: | Re: Regular expression: How to determine wether entry is a number?, Paul Lalli |
| Previous by Thread: | Evaluate an operator given as a string, Amit Koren |
| Next by Thread: | Re: Evaluate an operator given as a string, John W. Krahn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |