#! /usr/bin/perl use strict; use DBI; die "Usage: status [ ...]\n" unless $#ARGV >= 0; my $id = @ARGV[0]; my $dbh = DBI->connect("dbi:Pg:dbname=eppie;host=localhost;port=5432") || die "Error connecting to database: $DBI::errstr\n"; my $sth = $dbh->prepare(qq{ SELECT st8a, st8b FROM sample WHERE id=$id}); $sth->execute() || die "Error executing query: " . $dbh->errstr . "\n"; $sth->finish(); $dbh->disconnect();