Not to force my own style on others but ... I would suggest using the FileHandle module:
use FileHandle; my $fh_header = new FileHandle; $fh_header->open("header.html") or die("Cannot open file: $!\n"); print $fh "stuff ..."; my $fh_footer = new FileHandle; $fh_footer->open("footer.html") or die("Cannot open file: $!\n");
I have also started using the q() and qq() quotation methods instead of here docs. I feel they're slightly easier to handle.
print qq( < meta name="author" content="$form{'author'}"> < meta name="distributor" content="$form{'distributor'}"> < meta name="copyright" content="$form{'copyright'}"> < meta name="keywords" content="$form{'keywords'}"> < meta name="description" content="$form{'description'}"> < meta name="generator" content="SpyderTag V1.0!"> < meta name="robots" content="$form{'robots'};"> < meta name="language" content=$form{'language'}"> < meta name="distribution" content="$form{'distribution'} );
Hope this helps.
----------------------------
$will->code for @food or $$;

In reply to Re: How do you open a file when using strict? by smalhotra
in thread How do you open a file when using strict? 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.