Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: C any bugs?

by jeroenes (Priest)
on Jun 18, 2001 at 21:19 UTC ( #89364=note: print w/replies, xml ) Need Help??


in reply to C any bugs?

  1. use strict or die (updated)
  2. declare your variables with my
  3. Try CGI's builtin functions for generating the header, form, tags and actually all html.  use CGI qw/:html3/
  4. I wouldn't use eval to trap errors. There is an option for CGI like use CGI::Carp 'fatalsToBrowser'; (updated).
  5. The while loop could be done more concise:
    while( <GUESTS> ){ #no chomp, we need the \n later on... split /::/; if( $_[0] =~ /$search_name) { print join "<BR>\n", @_; print "<HR>\n"; } }
  6. Try use diagnostics;, maybe you like it. I do.
Jeroen
</code> "We are not alone"(FZ)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89364]
help
Chatterbox?
[choroba]: Yeah, let's ban dot in INC, but add glob to it!
[Corion]: choroba: Well, at least the above is user-defined, not implicitly by Perl ;)
LanX globalization is evil! Lets Perlxit!

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2017-01-19 15:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.