I'm trying to check if a file exists on a remote machine using perl.  I am unable to 
make this work.  Anyone have any suggestions?

Thanks!

Randy


       #       if source files not there, error
        $length=@source_file;
        $counter=0;
        print "\n\n";
        while ($counter < $length)
        {

        #print "\nCHECKING REMSH\n";



                $pcommand="remsh $source_machine -l username -n ls 
$source_file[$counter] 2>/dev/null;";

                if (  `$pcommand` !~ "$source_file[$counter]" )
                {print "\n >>> COULD NOT FIND SOURCE FILE>>> 
$source_machine[$counter]:$source_file[$counter]\n\n\n";exit;}

                $counter++;
        } 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to