use LWP::Simple; print "write the name of the folder where you wanna save your file: "; my $Dir= ; chomp ($Dir); if(!-e $Dir) { system "mkdir $Dir"; } if(!-w $Dir or !-d $Dir) { die "ERROR: Cannot access directory: '$Dir'. Exiting\n"; } print "write name of the path of that directory: "; my $path= ; chomp ($path); my $pdb = ; #if you wanna try use 1xmj... chomp ($pdb); my @files = (["http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/RunLigplot.pl?pdb=1xmj&file=ligplot01_01", "/$path/$Dir/name_file.pl"]); for my $duplet (@files) { mirror($duplet->[0], $duplet->[1]); }