Hi,

I have a couple of questions. I will ask them first and explain why I'm asking afterwards...

__QUESTIONS__

1. Can I create multiple tokens in one file that I can be read with seperate filehandles? i.e. : __DATA1__ , __DATA2__ etc?

If so, how do I terminate each one?

2. Can I load modules using a variable? i.e. "use $module_name;"?

3. How do I output a processed html page with a dynamic image in it? If I create an image with GD for example, how can I display it in some html generated by perl that doesn't require me to save the image each time?

__EXPLANATION__

$short_answer =
"I am curious and think that these could help me";

$long_answer = "
If I can use multiple tokens I can store lots of things in packages instead of seperate files, it would be useful to be able to store all html output or email templates for example in one file rather than having lots.

If I can load a module based upon a variable ... umm, not sure - I will think of use for it.

I am writing a script that will output an html page with statistics and a graph. I suppose that I could output the html, link the <IMG SRC> to a script that will send back an image mime header with the image?";

__END__

In reply to This might not be in the spirit of iTIMTOWTDI/i, but... by $code or die

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.