But it would be infintely safer if you just parsed the string as an optree and executed it appropriately. If you look around the Monastery you'll find many examples of this sort of situation.my $res = eval "@ARGV";
_________
broquaint
In reply to Re: extract an operator from a string
by broquaint
in thread extract an operator from a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |