in reply to Perfecting index.pl some more!
Don't use FatalsToBrowser in production code, it's a useful tool for testing, it's a potential source for hackers to gather information of your server.
Separate perl-code and html. You can use templating solutions for that like Template (there are more templating solutions, look around on permonks,cpan).
For separating into subroutines, there are no strict rules, but try to split it up in places you think are logical. For instance a CGI script with several states could be split up in one subroutine per state. Experiment with it, see if you can find pieces in your code that look reusable, so if you make them into a subroutine you could use this subroutine later on in another script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perfecting index.pl some more!
by Nik (Initiate) on Apr 30, 2005 at 18:10 UTC |