in reply to I cannot create backup copy during file name change

That's not what $^I = ".bak" does. It is used in conjunction with @ARGV and the diamond operator.

If you want to create a backup copy of the file use:

system cp => $old_filename, $backup_filename;

(Or File::Copy for better cross-platform support.)

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^2: I cannot create backup copy during file name change
by rnaeye (Friar) on Jul 24, 2012 at 16:24 UTC
    Thanks.