Perl Monk, Perl Meditation | |
PerlMonks |
(ichimunki) Re: problems editing a flat-fileby ichimunki (Priest) |
on Jul 18, 2001 at 01:57 UTC ( [id://97476]=note: print w/replies, xml ) | Need Help?? |
You should probably consider "use strict" and #!/usr/bin/perl -w. For a web script you should investigate -T as well. You should probably consider using the wonderful CGI functions that make HTML happen for you (your code becomes a lot more readable as a Perl script when you do this). This would also allow you to do away with print_start_page and print_page_end. The sub valid_form does not appear to be properly closed-- although you have an extra } hanging off the end of the script, which will close it in order to prevent compiler warnings. As others have noted, your indentation style is a little obscure-- I suggest finding an editor (see Outside Links) that will automatically assist you in this. I use emacs on both Linux and Windows and find it to be an excellent cross-platform tool. Finally, my personal preference would be to replace &subroutine with subroutine() for subroutine calls and to consistently parenthesize all function calls for readability: push( @my_array, $my_new_value );. YMMV.
In Section
Seekers of Perl Wisdom
|
|