#!/usr/bin/perl -w package Exported; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = (); # no default exports @EXPORT_OK = qw(&getdb); %EXPORT_TAGS = ( All => [qw(&getdb)] ); sub getdb { my $query = $main::dbh->selectrow_hashref("SELECT something FROM a_table"); return $query->{'explanation'}; }