in reply to How to make a perl file add random numbers that a user enters?

If you want to add 2 numbers, use +
my $result = $x + $y;
If you want to subtract 2 numbers, use -
my $result = $x - $y;
You could use an if/elsif/else block to decide what operator to use based on the user's input for step 3. See also perlsyn.