Thank you Stephanie, but I am still having trouble.
I uploaded p2.pl, the same program that just prints a different message. I 'chmod' it using file manager to 755, but it still doesn't work like the original p1.pl.
Neither does p1.cgi, which is also set to 755. p1.pl works. Is there something magical in what you did?