http://www.perlmonks.org?node_id=932565


in reply to to run a command from $ shell in perl program

You are getting the Postgres shell, not a Perl shell. You cannot use Perl at the Postgres shell.

I'm wrong, you're just at the postgres user's shell. Maybe you want to use psql to use Postgres.