Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Linux message log webifier

by wog (Curate)
on Aug 31, 2001 at 09:00 UTC ( [id://109299]=note: print w/replies, xml ) Need Help??


in reply to Linux message log webifier

... since you asked for comments .... Two key issues here:

  • Please use warnings and strict.
  • Always check the return value of system calls like open, so you don't get very odd things happening when/if they fail, e.g.:
    open (TEMPOUT,">$outfile") or die "opening $outfile: $!\n";

Less importantly:

  • You could improve much of your HTML outputing code with heredocs:
    print TEMPOUT <<"END"; <html><body> ... END
  • You may wish to look at the $. line-counting variable documented in perlvar as an alternative to your counter variable.
  • You output malformed HTML. Please close all tags,use DOCTYPE at the beginning of your document, and quote attribute names not containing only alphanumeric characters, etc.

Replies are listed 'Best First'.
Re: Re: Linux message log webifier
by hans_moleman (Beadle) on Aug 31, 2001 at 15:34 UTC

    thanks for your comments!

    it is appreciated...

    Actually, I found the script was difficult to debug because of file issues, so your point about evaluating system calls is especially well taken. ;)

Re: Re: Linux message log webifier
by hans_moleman (Beadle) on Aug 31, 2001 at 17:14 UTC

    You'll note I have implemented most of your suggestions. Sure looks a lot cleaner ouputing the HTML that way... Thanks again.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://109299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-12-09 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (53 votes). Check out past polls.