in reply to browser downloading perl script

I don't know why this would happen "on and off," but this is most likely due to bad server configs. Your web server needs to associate a certain file extension (.pl, perhaps) w/ being a Perl script so that it knows to execute it and not just shove the contents of the script back to the browser. So it's not your browser--it's the web server.