I had a problem that was causing perl to throw error messages like that a while back when transfering perl scripts from winME to my freesco linux router. After pulling my hair out for a bit I realized that I was transfering them as text instead of binary. When I transfered them using binary (using ftp) everything worked fine.