jesuashok has asked for the wisdom of the Perl Monks concerning the following question:
In the above code I would like to have PROCESS_ID of one line perl code as the backup file extension. but surprisingly, I am always getting the shell PID as the pid suffixed to the backup filename. how can I get the PID of one line perl code which got executed as above as the filename's extension?perl -i.$$ -pe 's/search/replace/g' *.html
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Backup filename extension with -i option
by ikegami (Patriarch) on Dec 26, 2006 at 09:13 UTC | |
|
Re: Backup filename extension with -i option
by ferreira (Chaplain) on Dec 26, 2006 at 14:48 UTC | |
|
Re: Backup filename extension with -i option
by jonadab (Parson) on Dec 26, 2006 at 15:05 UTC | |
|
Re: Backup filename extension with -i option
by f00li5h (Chaplain) on Dec 27, 2006 at 01:25 UTC |