Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
why this instead of use LWP; ? You could actually use LWP; as the LWP module goes ahead and require()s the LWP::UserAgent module for you. But, the functionality you want is provided by the LWP::UserAgent module so you might as well use it directly. what's happening here?, in particular, who are the functions, who are the arguments and who are the results? The function being called is the new() funtion in the LWP::UserAgent class. It returns an LWP::UserAgent object which is then stored in $ua. what is agent("...") and why is it needed? That sets the user-agent header that the server gets when you make a request. The server can be configured to do behave differently based on the content of this header. You should probably use it to identify your program, but other uses would include emulating another browser like Mozilla or IE. The docs, which should be accessible via man LWP::UserAgent or perldoc LWP::UsesrAgent will come in handy. You'll probably also want to read perldoc HTTP::Request and perldoc HTTP::Response as soon as possible. Good luck. -sauoq "My two cents aren't worth a dime."; In reply to Re: Re: Re: PERL HTTP posts.
by sauoq
|
|