I have PSQL running, and am trying to get a perl application connecting to the database. Is there a command to find the current port and host that the database is running on
The postgresql port is defined in your postgresql.conf file.
postgresql.conf
For me in Ubuntu 14.04 it is: /etc/postgresql/9.3/main/postgresql.conf
/etc/postgresql/9.3/main/postgresql.conf
Inside there is a line:
port = 5432
Changing the number there requires restart of postgresql for it to take effect.