in reply to CGI script bringing its own data

You could include the entire content of the PNG file as a single string in your program. Just make sure you escape the delimiters. Or you could uuencode the PNG file and include that as a string.

Personally, I'd leave the PNG file as a separate file.

Abigail

Replies are listed 'Best First'.
Re: Re: CGI script bringing its own data
by hacmac (Novice) on Sep 03, 2003 at 10:37 UTC
    Thanks for your advice. I really believe it's a Good Thing(tm) to bring the icons (see, it's not unbelievable amounts of data) inside the script, because there are less things to go wrong. Uuencoding might be an option. Is there a more "canonical" way to do it? I know, tmtowtdi, but I don't want people to look at my script and think "gee, what a moron". ;-) -hacmac
      I doubt there's a canonical way of doing it in Perl, as I've never seen or heard about any program doing so. In C program, you seem sometimes small images imbedded by defining an appropriate array with byte values.

      Abigail