#!/usr/bin/perl

use Time::localtime;
        $| = 1;
	use CGI qw(:standard);
	$query = new CGI;
	
	use DBI;
	my $dbh = DBI->connect("dbi:Pg:dbname=arch_historicos", "postgres", "bidoc04");

my $ary = $dbh->selectall_arrayref('select * from archivos_historicos'); 
print "Id\tnombre\tpath\n"; 
print "="x50,"\n"; 
for ( @$ary ) { 
	my ( $id, $nombre, $path )= @$_;
	print "$id\t$nombre\t$path\n"; 
}
	
	my $rc = $dbh->disconnect(); 
