http://qs321.pair.com?node_id=288585


in reply to CGI script bringing its own data

I believe you're looking for the __DATA__ filehandle. Stick it at the end of your code, and you can treat it just as if you'd opened a regular file.
while (<DATA>) { # do stuff with $_ } # ...or a slurp seek(DATA,0); my $data = (<DATA>); # end of script __DATA__ # Data # Data # Data
Cheers, Ben.