The "." shell command doesn't do what you think it does. As McA says, it tells the shell to read commands from the supplied file. You're giving it a file full of perl commands. Think of it like talking to someone in a language they don't understand. That's not going to work except in the case of a strange perl file.