Coplan has asked for the wisdom of the Perl Monks concerning the following question:
I have two thoughts as to how this might be done:
1) The script either runs as a copy, or creates a copy of itself and examines the file that is not currently being accessed. If necessary, make changes the the accessible copy and, when finished, the script closes itself and runs the new version of the script (and delete the old version).
2) Load and run the script in memory so that there's no file access violations on the original file, and whenever a change is made, that file is updated. When the script is complete, you will be left with an up-to-date file as a result of the scripts own changes.
Are either of these options possible? Or am I getting into something that is beyond the limitations of Perl? I just think that the possibilities of such a method would be endless.
FYI, I'm using a Redhat Linux OS.
--Coplan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Run as copy or read/write self
by broquaint (Abbot) on May 14, 2003 at 17:20 UTC | |
|
Re: Run as copy or read/write self
by halley (Prior) on May 14, 2003 at 17:08 UTC |