Wow, books ;)

I can't begin to speculate on why Stein does what he does, but it appears he uses heredocs for the bits that are static.

Most of sulfericacid's use of CGI.pm's html generating functions doesn't involve any dynamic data, so he might as well use the functions once, and then write

print <<'SUBMITFORM'; <form method="post" action="?" enctype="multipart/form-data"> <table><tr><td>File: </td> <td><input type="file" name="upload" size="50" maxlength="80" /></td> +</tr> <tr><td /> <td><input type="submit" name="button" value="submit" /></t +d></tr></table> <div></div></form><hr /> SUBMITFORM
As for functions being written as hr() or br(), there are some implications (perlsub)
C:\>perl -Mstrict -MCGI -we"print hr" Unquoted string "hr" may clash with future reserved word at -e line 1. Name "main::hr" used only once: possible typo at -e line 1. print() on unopened filehandle hr at -e line 1. C:\>perl -Mstrict -MCGI -we"print hr()" Undefined subroutine &main::hr called at -e line 1. C:\>perl -Mstrict -MCGI=hr -we"print hr()" <hr /> C:\>perl -Mstrict -MCGI=hr -we"print hr" <hr /> C:\>
but to me it's all the same.


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: Re: Re: Re: Re: Or die killing my script by PodMaster
in thread Or die killing my script by sulfericacid

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.