CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Printing question

 



scj2012
Novice

May 22, 2013, 11:45 AM

Post #1 of 3 (857 views)
Printing question Can't Post


Code
$ua->proxy(['http','https'] => $proxy);


Ok, we have a hash here with http and https paired with $proxy.
How do I print http value in a perl script?


BillKSmith
Veteran

May 22, 2013, 12:05 PM

Post #2 of 3 (855 views)
Re: [scj2012] Printing question [In reply to] Can't Post

There is no hash here at all. "proxy" is a method of the object $ua. which sets or gets the proxy servers. The method takes two arguments. The first is a reference to an array of protocol names. The second is the URL of the proxy server. In this case, the symbol '=>' has exactly the same meaning as a comma.

The name 'http' is a scalar value. In a sense, this method "pairs" it (and 'https') with the url in $proxy.
Good Luck,
Bill


scj2012
Novice

May 22, 2013, 12:27 PM

Post #3 of 3 (851 views)
Re: [BillKSmith] Printing question [In reply to] Can't Post


In Reply To
There is no hash here at all. "proxy" is a method of the object $ua. which sets or gets the proxy servers. The method takes two arguments. The first is a reference to an array of protocol names. The second is the URL of the proxy server. In this case, the symbol '=>' has exactly the same meaning as a comma.

The name 'http' is a scalar value. In a sense, this method "pairs" it (and 'https') with the url in $proxy.


Thanks.

I'm so used to associating => with hash key/value pairs.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives