mdillon's response is the perl side of it. It's as easy as that. On the postgre side, don't forget to configure a user (mySQL uses a GRANT statement, and I think that's pretty much standard SQL; check your documentation) and secure it by host and password (ie. only allow that user to connect from that host with that password).
And if you're considering using this database a lot from different scripts, for the love of God, don't put the user and password and database location in each script. Write a module (My::DB or something) that connects to the database for you and returns the handle. There's no sense in having the user/pass in 15 different scripts that you then have to scrounge through when you have to change the information.
The other benefit is that you can implement connection caching and things like that, although other modules may do this more efficiently for you.
Probably a bit more information than you may have asked for, but it's good to plan these things out ahead of time before you get too far down the road and have to smack yourself in the forehead.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.