my $val1 = 1223; my $val2 = 2344; my $oper = "<="; if (val1 $oper $val2) { # Etwas machen }