Shouldn't that be

if ( eval "\$consumption $operator" )

I doubt the existance of a need to stringify and evaluate the contents of $consumption.


In reply to Re^2: Using dynamic operators in an if() statement by ikegami
in thread Using dynamic operators in an if() statement by captkirk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":