in reply to Silly Badly Done Script Which Impresses the Heck Out of Client

As long as both arguments are of the same type (file=>file or directory=>directory) and you're on a real OS then rename should overwrite any existing target file. So you could have just done:

rename( "indexalt.html" => "index.html" ) or warn "Couldn't rename: $!";";
  • Comment on Re: Silly Badly Done Script Which Impresses the Heck Out of Client
  • Download Code