Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
You could just create a script that outputs the tail information and then does a refresh of itself. If you don't want to use, Try this:


print "Content-type: text/html\n\n";

# Do tail stuff here
my $tail = ...
# Replace carriage returns with br and carriage return
$tail =~ s/\n/<br>\n/g;

# print it out
print <<END_HTML
<title>Tail Script</title>
<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=/cgi-bin/cgiscript.cgi">
<h1>Tail Program</h1>

Where "cgiscript.cgi" is the name of this script. (You might be able to use $0, but I haven't tried that in a CGI).

Then the browser will refresh to your current CGI every 2 seconds or whatever interval you set in the meta tag.

It's a hack, but it should work.


In reply to Re: A Simple "Tail" Question by mlong
in thread A Simple "Tail" Question by lindex

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2023-04-02 00:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found