Help for this page

Select Code to Download


  1. or download this
    print "Before timeout: " . localtime() . "\n";
    my $timeout = 50;
    ...
        [qr/^OK$/ => sub { print "Success!\n"; }],
        [qr/^ERROR$/ => sub { print "Failure!\n"; }]) or warn "Timeout!";
    print "After timeout: " . localtime() . "\n";
    
  2. or download this
    Before timeout: Tue Nov  8 03:31:02 2011
    Timeout! at getdbm.pl line 18.
    After timeout: Tue Nov  8 03:31:04 2011