"Terminal read. The handle is invalid." - Log file viewer 
Author Message
 "Terminal read. The handle is invalid." - Log file viewer

Hi,

My script to view unix log files works well, however I get the strange
error "Terminal readThe handle is invalid" at the first line of every
output it produces, even though the output is 100% correct otherwise
(no visible errors)..

Any ideas why /what??

Script:

#! /usr/bin/perl

use CGI qw(param);

$host= param("host");
$log= param("log");
$lines= param("lines");
$refresh= param("refresh");

$output= `rsh $host -l dmadmin tail -$lines $log`;

print "Content-type: text/html\n\n";
print "<meta http-equiv='Refresh' content='$refresh'>";

print "<html><body bgcolor='#FFFFFF' text='#000000'>";
print "<font face='Verdana, Arial, Helvetica, sans-serif' size='1'
color='#999999'>";
print "<h1>[start]<BR>";
print "</h1>\n";
print "$host <BR> $log <BR> Refresh every $refresh second(s)";
print "<BR><BR>";
print "<font face='Verdana, Arial, Helvetica, sans-serif' size='3'
color='#000000'>";

print "<pre>$output</pre>\n";

print "<font face='Verdana, Arial, Helvetica, sans-serif' size='1'
color='#999999'>";
print "<html><body><h1>[end]";
print "</h1></body></html>\n";



Mon, 17 May 2004 15:34:53 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Writing to a "log" file

2. Open error message "Invalid argument"

3. Why "Invalid conversion"?

4. How to "my" a file handle

5. "Invalid Switch" Message - Win32/DOS/Win95

6. PerlShop "invalid transmission"

7. File Handles and "use strict"

8. File handles and "use strict;" problem

9. Read Event Viewer Log

10. help reading a "pst" mail file

11. reading binary files in "NT" perl

12. file access mode "+<" read/write

 

 
Powered by phpBB® Forum Software