in reply to FTP - Downloading New Files Only

if ( -f $path.$x_files ) { print "File $x_files already exists!\n"; } else { $ftp->get($x_files, "$path".$x_files) or die "Can't fetch $x_f +iles: $!\n"; }

Replies are listed 'Best First'.
Re^2: FTP - Downloading New Files Only
by Anonymous Monk on Mar 10, 2008 at 20:02 UTC
    Should this line if ( -f $path.$x_files ) be if ( -e $path.$x_files ) with "-e"?
Re^2: FTP - Downloading New Files Only
by apl (Monsignor) on Mar 10, 2008 at 20:21 UTC
    My copy of the Camel Book used -f, and so do I. 8-)

    You are, of course, correct. -e would work as well.