Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
more useful options
 
PerlMonks  

Re: CGI script bringing its own data

by benn (Vicar)
on Sep 03, 2003 at 07:00 UTC ( [id://288585]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://288585]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.