Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqlexpress database file auto-creation error, dbf2mysql parameter, WWWXXXAPC, wwwxxxAPC, How to unsubscrube from dategen spam, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO

Links

XODOX
Impressum

#1: What does "print $cgi->header" do?

Posted on 2008-04-21 20:45:58 by Jonathan Mast

------=_Part_3882_28716172.1208803558602
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

There is a line in script we have that I find baffling, it is

print $cgi->header;

To me this seems to be printing the results of the header method of the CGI
module to standard output.

Is something else going on here as well?

Thanks

------=_Part_3882_28716172.1208803558602--

Report this message

#2: Re: What does "print $cgi->header" do?

Posted on 2008-04-21 20:57:00 by chas.owens

On Mon, Apr 21, 2008 at 2:45 PM, Jonathan Mast
<jhmast.developer@gmail.com> wrote:
> There is a line in script we have that I find baffling, it is
>
> print $cgi->header;
>
> To me this seems to be printing the results of the header method of the CGI
> module to standard output.
>
> Is something else going on here as well?
snip

The standard output is the resulting html page when using CGI*.

* http://search.cpan.org/~lds/CGI.pm-3.35/CGI.pm#CREATING_A_ST ANDARD_HTTP_HEADER:


--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Report this message

#3: Re: What does "print $cgi->header" do?

Posted on 2008-04-21 20:57:50 by krahnj

Jonathan Mast wrote:
> There is a line in script we have that I find baffling, it is
>
> print $cgi->header;
>
> To me this seems to be printing the results of the header method of the CGI
> module to standard output.

Correct.


> Is something else going on here as well?

That depends on what the currently selected filehandle is and what the
values of $\ and $, are.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Report this message