Also, OP probably meant: my ($opstr) = $vmstr =~ /-(\d+)$/; in the case of one digit (e.g. 0)?my $opstr = '01'; my $foo = "a_${opstr}_b"; my $bar = 'a_'. $opstr .'_b'; print "$foo\n"; print "$bar\n";
In reply to Re^2: appending a variable
by Marshall
in thread appending a variable
by pragovnj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |