my $opstr = '01'; my $foo = "a_${opstr}_b"; my $bar = 'a_'. $opstr .'_b'; print "$foo\n"; print "$bar\n";