When saving a file as UTF-8 with Notepad under XP, notepad will insert a byte order mark before the first character of the first line. Apache then can't serve the script as it can't parse the magic first line, and can't find perl (or whatever) Workaround is not to save in UTF-8, or not to use Notepad, but apache should be able to recognize byte order marks. (related bug #11847, but that seems to be concered with xml)
This was fixed in HEAD (2.1 branch) some time ago.