use strict; use warnings; my $opstr = '01'; my $foo = "a_${opstr}_b"; print "$foo\n";