I've read quite a few links already on modules but I'm still not getting quite what I'm looking for. For now, I'm just trying to setup a simple module that does SOMETHING, in this case just print "HELLO WORLD". No errors are appearing at run time but nothing prints, can someone explain why?

Essentially I'm looking to have something setup like LWP::Simple where I can use things such as

my $this = get($that);
where get() could be collect() or anything. That's what I'm trying to get a module to be able to do incase anyone has suggestions on how that is done. I ripped open Simple.pm and needless to say that didn't explain much :)

Both mod.pl and TestPrint.pm are sitting on my desktop so they're both in the same place. UPDATE----------
As suggested by two people, I tried using both of these and the lack of results are the same:
&test_print;
test_print();
/UPDATE----------

TestPrint.pm package TestPrint; use Exporter; @ISA = 'Exporter'; @EXPORT_OK = qw(test_print); use strict; sub test_print { print "hello world"; return; } 1; __END__ mod.pl #!/usr/bin/perl use warnings; use strict; use TestPrint qw(test_print); &test_print; # seems to do nothing test_print(); # also seems to do nothing


"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid

In reply to First attempt at a module 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.