platypus55
Programmer
I have this file, I want to substitute stuff into it and print it out. So I have this hash of all the stuff I want to substitute. The stuff I want to zap is the keys and the values are the stuff I want to substitute in for them. The test file has multiple occurrences of all the keys.<br><br>foreach $key (keys %myhash) {<br> if (/$key/) {<br> s/$key/$myhash{$key}/;<br> }<br>}<br><br>But it doesn't change anything. How can I get it to EVALUATE $key? I'm a perl newbie so if you have a better way to do this thing I'm open to it. thank you.