It should be really straightforward to do. You're almost describing a quine. Try running spiraling quine for one (not-so-obvious) approach. My own quine is the Pentominos Solving Quine.
One common method that quines in Perl often use is to rewind the DATA handle or the 0 handle, which can read the script's own source code as data. If you want it to invoke the new version, see the exec() built-in function.
--
[ e d @ h a l l e y . c c ]
In reply to Re: Run as copy or read/write self
by halley
in thread Run as copy or read/write self
by Coplan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |