Think about Loose Coupling | |
PerlMonks |
Re^2: testing an if statement in a stringby LanX (Saint) |
on Oct 31, 2013 at 15:43 UTC ( [id://1060603]=note: print w/replies, xml ) | Need Help?? |
> eval "\$ret = $cond"; a bit over complicated , eval returns (like sub or do) the result of the last expression.
but checking $@ is always a good idea! =)
updateor an additional eval BLOCK to catch all error
Cheers Rolf ( addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom
|
|