Operator in a variable

Question

Could I write something like:

my $op = '+';
my $result = $a $op $b;

that would be evaluated as:

my $result = $a + $b;

Michael Roper's original post

Next