my $operator = '> 98.0'; if ( eval $consumption . $operator ) { } #### sub LIMIT () { 98.0 } if ($consumption > LIMIT) { }