Re: How do I understand this HTTP::Request->new(GET => $url);

2007-02-12 Thread John W. Krahn
Spark Shen wrote: > 2007/2/12, John W. Krahn <[EMAIL PROTECTED]>: >> >> Spark Shen wrote: >> >> > I am a fresh bird on perl. :-) Could gurus help me to understand this >> > statement. >> > >> > *HTTP::Request->new(GET => $url);* >> > >> > How does perl parse the struct *GET => $url* here. >> >> (GE

Re: How do I understand this HTTP::Request->new(GET => $url);

2007-02-11 Thread Jeff Pang
> If *GET =>$url* is a method invocation here, what is the operator => stands > for? '=>' is equal to ',' in perl,so you can write it as: HTTP::Request->new('GET',$url); Here both 'GET' and $url are the arguments of new(). >What's it context? list or scalar? > These are the basic concepti

Re: How do I understand this HTTP::Request->new(GET => $url);

2007-02-11 Thread Owen Cook
On Mon, Feb 12, 2007 at 03:31:01PM +0800, Spark Shen wrote: > Hi: > > I am a fresh bird on perl. :-) Could gurus help me to understand this > statement. > > *HTTP::Request->new(GET => $url);* > > How does perl parse the struct *GET => $url* here. > > I found out GET is a method defined in HTTP:

Re: How do I understand this HTTP::Request->new(GET => $url);

2007-02-11 Thread John W. Krahn
Spark Shen wrote: > Hi: Hello, > I am a fresh bird on perl. :-) Could gurus help me to understand this > statement. > > *HTTP::Request->new(GET => $url);* > > How does perl parse the struct *GET => $url* here. (GET => $url) is a list of two elements. It could also be written as ('GET', $url)

How do I understand this HTTP::Request->new(GET => $url);

2007-02-11 Thread Spark Shen
Hi: I am a fresh bird on perl. :-) Could gurus help me to understand this statement. *HTTP::Request->new(GET => $url);* How does perl parse the struct *GET => $url* here. I found out GET is a method defined in HTTP::Request::Common. If *GET => $url* is a method invocation here, what is the ope