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

Monks!
I want to create a program to cache pages and images visited from WEB (like a proxy cache) in a MySQL database (or a DB_File) and simple enought to serve only one computer, but make BIG caches.
It wouldn't be too hard, but the problem is: I'm running ActivePerl (perl 5.6.1) on Windows. Fork seems to crash PERL.EXE. The threads suport isn't compiled.
I tried to code a CGI script to open URLs but it is inviable...
I ask to you: do I have other alternative in Perl? Any ideas?
Tks!

Replies are listed 'Best First'.
Re: Perl proxy-cache in win32
by Agermain (Scribe) on Jul 23, 2001 at 22:18 UTC
    I wrote a program once that just saved webpages into text files, using ActivePerl on a WinNT box. The key wasn't threads support or sockets, though - it was using the LWP::Simple module to snag webpages. I think LWP comes with the ActivePerl distribution.
    use LWP::Simple; $doc = get 'http://www.mysite.com'; print $doc;
    Instead of 'print' of course, you'd save $doc to a file or upload to your DB. I hope this helps? andre