Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: using 'require' to insert code

by synapse0 (Pilgrim)
on Jul 23, 2001 at 10:17 UTC ( [id://98922]=note: print w/replies, xml ) Need Help??


in reply to Re: using 'require' to insert code
in thread using 'require' to insert code

Well, I have something to say to main poster and a reply to HZ.. To the main poster, start using CGI.pm it's really just as simple as:
#!/usr/bin/perl -wT use CGI; my $cgi = new CGI; print $cgi->header;
And then just throw in CGI specific code as you learn it.. but you don't *need* any more lines than that, and to know that you can grab POST and GET data by calling $cgi->param();
As for the sample above.. there's no reason to put possibly large html files into a memory consuming array, better to just read them in and spit them out (unless of course the data needs to be manipulated):
open(HTML, "<$htmlfile") || die "ouch $!"; print <HTML>; close(HTML);
-Syn0

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2024-04-23 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found