codemonkey has asked for the wisdom of the Perl Monks concerning the following question:

Hey monks, I am using SSLeay like this:
use Net::SSLeay qw(post_https make_form); ($return_code, $result, %headers) = post_https('foo.com', 443, '/cgi-b +in/secure.cgi', '', make_form('foo=>"$bar"));<br>
How can I give it a timeout value of say 10 seconds?
Will this work?
my $ua = new LWP::UserAgent;
$ua->timeout(10);

Replies are listed 'Best First'.
(jptxs) Re: SSLEAY and timeout settings
by jptxs (Curate) on Feb 24, 2001 at 06:22 UTC
    <guess> have you looked into alarm? this function will let you do something for a given amount of time and then stop it. May be able to bend to your will. </guess>
    "A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche