Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to save the backup to another directory. Something like this.
perl -i'/tmp/new_test.backup' -lane 's/hello//g; print' /usr/local/tes +t.conf
The above gives an error. But if I just do '-i.backup', then it works fine. But I don't want the backup to be saved in the same directory.

Replies are listed 'Best First'.
Re: Saving backup to another directory
by lidden (Curate) on Jul 14, 2011 at 21:16 UTC
    Read perlrun about using * in the file name given to the -i switch.
Re: Saving backup to another directory
by Anonymous Monk on Jul 15, 2011 at 01:05 UTC