Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Ok, I'm not too good at this, so I thought this might be a good time to practice then. I found a few things I found curious, although I can't be 100% sure they are wrong, so I'll just post them and see if I hit any marks. :)

Here's one I am not sure about:

open(OUTPUT,">>$outputFile");
I would, at a wild guess, think that if uploading resumés, and with the same name, they would, if anything, replace the old one - or be disallowed. This appends to an earlier file, which just seems wrong. I can guess the file will be deleted when this script is done, but this allows for strange effects. Using a unique temporary name would have been better, if the file should not stay there, or to check for duplicates if it should stay. File locking could be yet another way to go.

This, I wonder if it may have other implications elsewhere?

$CGI::DISABLE_UPLOADS = 0; # Temporarily reenable up
I'm not really sure how this works with CGI.pm and all, or how the rest of the code/system looks, but maybe a "local" would have helped?

I don't get this one either:

if ( $stats[7] > MAX_FILE_SIZE || %errors ) { $errors{'file_size'} = ["","","Your submitted file's size is over 3M +B."];
If there are errors, you automatically have too big file size? That ought to confuse a few... :)

This is an odd check:

if( $file_type =~ /octet-stream/ ) { $errors{ 'file_type' } = ["","","Unrecognize your submitted resume f +ile format."]; goto Print; }
There must be more non-allowed file types, or did he mean "!~"?

I'm sure I missed all the real errors, and pointed out perfectly legitimate stuff, but if that is so, I hope to learn something from the grind-my-face-in-the-ground treatment I am gonna get. :)


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.

In reply to Re: strict isn't everything by Dog and Pony
in thread strict isn't everything by Ovid

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 scrutinizing the Monastery: (6)
As of 2024-03-28 15:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found