in reply to IO::Select multiplexing
For me, the example web_fetch_p.pl + HTTPFetch.pm worked straight out of the box - almost. I downloaded the example zip file from the book and unzipped it.
Working on Win2k, I got this error on my first attempt to run it
I found a workaround"EINPROGRESS" is not exported by the Errno module at H:\devperl\socket +s\perl_networking\ch13\HTTPFetch.pm line 12
use POSIX qw(:errno_h); #use Errno 'EINPROGRESS';
After this, I successfully retrieved a couple of perlmonks nodes: ours and yours
Note: I also added the line to modify $localpath
so that the URL of a perlmonks node translates into a valid filename (HTTPFetch stores the retrieved URL content into a local file of similar name).$localpath .= "index.html" if $localpath =~ m!/$!; $localpath =~ s/[\?\=\&]/-/g; # Rudif
|
|---|