Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: 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 reply to (ichimunki) Re: problems editing a flat-file by ichimunki
in thread problems editing a flat-file by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-23 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found