Any light you can shed on these is appreciated.
1. I read somewhere that print statments are very slow, so I originally wanted to keep everything to one print at the very end. Would it be better to store all the variables globally or pass them to the subroutine that prints? (Let's just say we have 10-15 small variables or so.)
2. A little thing that's been bugging me: In a subroutine that takes parameters, is it faster to use shift() or $_[0]?
3. Normally, I use CGI.pm for my scripts, but it's a pretty large module and I'm concerned about speed since I only use it for reading cookies and submitted data. Would it be faster to just assign all the values to a hash at the beginning, and is there anything I might miss that CGI.pm would have caught?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.