Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: CGI script bringing its own data

by benn (Priest)
on Sep 03, 2003 at 11:00 UTC ( #288585=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: CGI script bringing its own data
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://288585]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2015-07-07 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls