If you're being asked to write code and work with databases on Unix but don't know how to use a Unix shell, then you need to ask your boss for some training.
Comment on Re: to run a command from $ shell in perl program
You logged in unix system with postgres super user account and you run perl script on the console but it didn't work as your ordinary account get worked it well, is this your situation?
In that case, which command and PATH env will help you, I guess. Good luck.