in reply to regular expressions and substituting in variables.
But it sounds like you have some rule for wanting to determine what to replace NUM with.@s_dn = map { s/NUM/1/; $_ } @s_dn;
for( @s_dn ) { my $num = 1; # calculate the local num, somehow. s/NUM/$num/g; }
|
|---|