in reply to Can you teach a new dog an old trick?
#!/usr/bin/perl -wpi s/string1/string2/g;
And then you'd run it as: myScript *.htm
update: note that the contents of a script run with -p or -n are inside a loop. If you want to initialize anything before the loop, use a BEGIN or INIT block.