Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

(ichimunki) Re: problems editing a flat-file

by ichimunki (Priest)
on Jul 18, 2001 at 01:57 UTC ( #97476=note: print w/replies, xml ) Need Help??

in reply to problems editing a flat-file

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2021-07-31 18:37 GMT
Find Nodes?
    Voting Booth?

    No recent polls found