http://www.perlmonks.org?node_id=1028580

abualiga has asked for the wisdom of the Perl Monks concerning the following question:

Hi there, I'm trying to understand interpolation of operators within strings. Specifically, can mathematical operators be interpolated within strings and evaluated as operators. Below is some example code to make my question clear. Many thanks!

my @ops = ( '-', '+', '*', '/' ); for( @ops ) { my $a = "2 $_ 2"; say $a; }

Is it possible iterate over these operations and perform calculations?