in reply to Update a perl script when its running

If modifications are intended as improvement of the code, or new version of the same file, so you can freely modify the source code and new call for the program will have the new version. Anyway it seems very dangerous approch to me.

If you have by other hand something to update in the main file, probably the best option is to put such infos in an external file.

One of my first question here was about the insane idea to modify $0: you can find this old node here. Note that merlyn suggested using Inline::Files and that BrowserUk was so kind to provide a working example

HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.