Hello people from the mighty list,
I have a problem with substitutions...
In the piece of code, here below,
"display $var1, $var"' should be "display val1, val2";
I don't see why, but the if condition doesn't seems to work...
and if I remove the if condition, the replacement doesn't occur...
Does any of you know why?
$VarValue{$var1} = "val1";
$VarValue{$var2} = "val2"
$Cmd = "display $var1, $var2";
foreach $Tmp ( sort keys %VarValue ) {
if ( $Cmd =~ /$Tmp/ ) {
print "***** In command $Cmd, replace $Tmp by $VarValue{$Tmp}\n";
$Cmd =~ s/$Tmp/$VarValue{$Tmp}/g;
}
}
Thanx a lot!
Wim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]