use strict; print "What operation?"; chomp(my $op=<>); if($op eq '-') { print $a-b; } elsif($op eq '*') { print $a*b; } #etc