#!/usr/bin/perl -w open(INIT, ">doit"); while () { printf "%s\n", $_; } close INIT; #### #!/usr/bin/perl -w unlink $0; # Delete myself! print "Still here!\n"; # Prove that script executes okay # Rest of code follows ...