in reply to Writing to a different file name

Whole file copying i suggest using File::Copy. Basicly you can do this.
use File::Copy; $A_file = $q->cookie('cookie_1'); $B_file = "file.txt"; copy ($B_file,$A_file);
Alternative way (probably slower though).
open FILE, "$B_file" or die "Unable to open \'$B_file\': $!"; open(OUT,">$A_file") or die "Unable to open \'$A_file\': while (<FILE>) { print OUT "$_"; }
Btw, if you want to remove old, then use rename command (instead of examples above).

Replies are listed 'Best First'.
Re: Re: Writing to a different file name
by wolverina (Beadle) on Dec 17, 2003 at 10:48 UTC
    Thanx... did the trick. -Lisa