in reply to simple newb question
How do you run the script? I can run it just fine. The problem might be some other interpreter than perl is trying to run the script (you are missing the !/ signs in the shebang line).