in reply to Re: Re: CGI script bringing its own data
in thread CGI script bringing its own data

But why would you want it to do that? It's not going to help you much.

But anyway, maybe the following will do the trick if you only have one file:

  1. add a line with __DATA__ at the end of your script.
  2. save the script and make sure the editor doesn't keep it open
  3. then in the shell, do a "cat pngfilename >>yourscript" (assuming you have a *nix here. If you have Win32, it might work in a command window by replacing "cat" with "type")
  4. open the script again, you should see a lot of garbage at the end, don't touch that.
  5. Remove the open() and close() calls.
  6. replace my $data = <$in_fh>; with my $data = <DATA>;

I haven't tried it myself. I hope your editor doesn't mangle the data. If it does, then keep a clean copy without the data at the end and create a final copy each time you made changes.

Hope this helps.

Liz