in reply to Duplicating HTML files

You could load the file into memory, operate on it there, and save it out to a different name.

Or use File::Copy.