Your script works fine for me when called like so:
my $index = 'data.txt'; my $backup = 'data2.txt'; back_up_file($index, $backup);
It copies the data into data2.txt as expected.
Update: Have you checked the backup file and Index files? Are they both actually empty? Do you open the files anywhere else in the script? If you post the rest of the code we can check it out.
In reply to Re: CGI troubles - not writing to file
by cjf
in thread CGI troubles - not writing to file
by emilford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |