system("plink $server"); rest of my perl script #### chdir ($pathToCheck); open theInputFile, $inputFile or die "Could not read from $inputFile, program halting. \n"; open (theOutputFile, '>', $outputFile) or die "Could not open $outputFile. \n"; while () { chomp; my $fileBeingChecked = "$_"; if (-e $fileBeingChecked) { #my $fileSize = -s $fileBeingChecked; my $fileSize = stat($fileBeingChecked)->size; my $date_string = ctime(stat($fileBeingChecked)->mtime); print theOutputFile "Yes, $fileSize, $date_string \n"; } else { print theOutputFile "No \n"; } } close (theOutputFile); close (theInputFile);