#!/usr/bin/perl # updater.pl use strict; use diagnostics; use File::Copy; # improve this shoddy programming, # remember to actually check the return values of move for errors move '529755.pl', '529755.pl~'; # create backup move '529755.pl.newversion', '529755.pl'; # deploy new version warn "deployed new version, going to run it now"; exec 'perl 529755.pl' or die "could not exec new version: $!";