I'm trying to get a script working that allows me to copy html files that I create on one server, to another server. I've searched on here and found a previous subject about it but it was not really what I needed.
In addition I can't get the following to work:
use File::Copy;
copy("http://wwww.myotherfile.com/topic3.html", "new_file.html");
The following creates the new_file.html but it is blank inside:
#!/usr/local/bin/perl
open(FILEREAD, "< [wmyotherfile.com...]
open(FILEWRITE, "> newfile****.txt");
while (<FILEREAD>){
print FILEWRITE;
}
close FILEWRITE;
close FILEREAD;
I've set chmod to 755 in each case.
Does anybody know what I need to do to copy one file from another server?
Thanks.