I didn't miss that detail. Here is a Perl program that
both writes and runs the script under Unix:
my $filename = "Just another Perl hacker,\n";
open (OUT, "> $filename\0") or die "Cannot write '$filename': $!";
print OUT 'die$0';
close OUT;
system "perl '$filename'";