use Storable q/thaw/; use MIME::Base64; use Data::Dumper; use DBD::Pg; use Carp; use Apache::Session::Serialize::Base64 qw/unserializie/; my $dbh = DBI->connect("dbi:Pg:dbname='TABLE_NAME'",q/postgres/,"",{AutoCommit =>0}) || croak "Could not Connect to DB $DBI::errstr"; my $sth = $dbh->prepare(qq{ SELECT "a_session" FROM sessions }); $sth->execute(); while ( my $col = ($sth->fetchrow_array)[0] ) { my %hash = %{ thaw(MIME::Base64::decode( $col ) ) }; while ( my ($k, $v) = each %hash ) { print "$col :\t $k => $v\n"; } }