in reply to This might not be in the spirit of iTIMTOWTDI/i, but...

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

  • Comment on Re: This might not be in the spirit of iTIMTOWTDI/i