#!/usr/bin/perl
use DBD::Pg;
my $file ="./nodes.csv";
my $database="network_db"; my$host="dbserver.example.com";
# Connect:
my $dbh=DBI->connect("dbi:Pg:dbname=$database;host=$host",'username','password');
# Verify that the connection succeeded:
if(!$dbh){ die"Cannot connect to database $database"; }