Thank you, GrandFather.

I just came back to report that I finally sorted it out. Only to find your kind words of wisdom. :)

This is what I ended up with (pageblocks.pm):

use strict; package webblocks; 1; # LOADING THIS MODULE in index.cgi returns UNDEF || FALSE without t +his sub print_xmlheader { return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; } sub print_xmldtd { return "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"h +ttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en +\"> <head> <meta http-equiv=\"content-type\" content=\"application/xhtml+xml; + charset=utf-8\" />\n"; }
...and in index.cgi:
print "content-type:text/html; charset=utf-8\n\n"; use lib ('./'); use pageblocks; print pageblocks::print_xmlheader(); print pageblocks::print_xmldtd(); ...

I notice the version you posted retains my original print statements. Is there any reason I shouldn't use the return statements I've just chosen?

"Define "actually works"." So noted. Thank you.

--Chris

#!/usr/bin/perl -Tw
use Perl::Always or die;
my $perl_version = (5.12.5);
print $perl_version;

In reply to Re^2: Help with proper construction of callable scalars from a Module, please. by taint
in thread Help with proper construction of callable scalars from a Module, please. by taint

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.