1. Don't think you can. _DATA_ is a special token, and it's
terminated automatically at the end of the file. Not really
even sure why you'd want to do this though. Keeping (for example) email
and html templates in one file may sound good at first,
but really it's much easier (and more portable) to keep
all your data pieces organized by file/folder combinations, and then have
your programs use just the parts they need.
2. Again, don't think you can. "use" is processed WAY at
the beginning by the Perl Interpreter, long before pesky
things like variable interpolation occur.
3. And lastly, no can do. HTML is output to a browser using
a particular Content-type HTTP header (i.e., text/html).
Graphics must be output to the browser using the appropriate
Content-type header (image/gif, image/jpg, whatever.) You
can't mix the two, so you can't send both kinds of data to
the browser at the same time. Your solution of linking
the graph to a Perl program that generates your image (and
then outputs it to the browser with the right header) will
work just fine.
Hope this helps.
Gary Blackburn
Trained Killer
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.