Do you know where your variables are? | |
PerlMonks |
Re: Logic expression evaluation not working. What am I doing wrong?by Cristoforo (Curate) |
on Jan 04, 2016 at 02:20 UTC ( [id://1151798]=note: print w/replies, xml ) | Need Help?? |
Add an eval to that printf, printf "%b\n", eval $newExpr;.
As AnonymousMonk says, care should be taken when using 'eval'. You should check as he does that only valid characters are allowed, especially if eval'ing a string from an unknown source. The unknown string could have malicious system commands, for example, to wipe out your hard drive.
In Section
Seekers of Perl Wisdom
|
|