in reply to Remote server file access issue
You should be able to get this to work as you intended by simply connecting to the remote host, then executing
No directory handles or evaluating each line of the file necessary, just ask the remote host to run the grep for you and react based on whether it found any matches or not.@filecont = $telnet->cmd("grep -i '$contcheck' $directory/$checkfile") +; if (@filecont) { $status = 'FAIL'; } else { $status ='PASS'; }
|
|---|