I've been asked this question often by others and although this isn't a perl-answer,
being a fellow XP-er (*sigh*), I thought, I should comment. (Perhaps, some monks
can take this info and find a perl-solution, as I do not pretend to understand everything
about networking.)
The 1st common cause - adware - has been mentioned. The first place I look for these is
via the System Configuration Utility (a shortcut to certain registry areas).
Under START->RUN->type: MSCONFIG (hit enter) then click the last tab at the top
(STARTUP)
That's a list of all your start-up programs. Viruses, Ad/spyware, etc all like to start,
when your pc does -> so, this is usually, where I find many of them. HOWEVER, don't just
uncheck all the boxes. Some are required and unchecking them will get you into a world of
hurt. Instead, compare what you have with this first.
The second common cause for these problems are the nice "features", which came built in.
In their rush to create the .NET stuff, XP has many networking features built into them.
The idea being, (I've heard) that many companies could use these tools to notify
employees, when the server might be going offline or something. The problem is that these
are active by default for everyone.
Some of these allow people to scan your pc or send you
those unwanted pop-ups. It may not have anything to do with adware, but rather, they're just
using eXPloits in the system. The most well-known hole has allowed the MS
Blaster and the new Sasser to be downloaded remotely (w/out any user involvement). A list can be found here though I don't know, if this
it's complete.
XP has a small built-in firewall to help prevent some of this. However, some ISPs may disable this, when you connect. (Earthlink, for one)
Another source of problems are messenger
problems (which runs as much as it can, regardless of whether you're using it or
not).
In addition, you might want to get a 3rd-party firewall, anti-viral software, and keep
your patches updated... in short... it's almost more work trying to keep crap out of an
XP-system, than just living with it. :-(