#!/usr/local/bin/perl package main; use strict; use Socket; use Carp; #-----------------------------------------------# # ESTABLISH RELATIVE DIRECTORY VARIABLES # # e.g. $0=/users/dbbrowse/WWW/DEALQUERY/top.cgi # #-----------------------------------------------# BEGIN { use Exporter(); use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $baseprog $basedir $pcommon $ppages $pcgibin $pjava $linkpages $hostname); $VERSION=1.00; @ISA = qw(Exporter); @EXPORT = qw(); %EXPORT_TAGS = (); # your exported package globals go here, # as well as any optionally exported functions @EXPORT_OK = qw( $baseprog $basedir $pcommon $ppages $pcgibin $pjava $linkpages $hostname $col_delim ); my @path = split("\/",$0); $baseprog = $0; pop(@path); if (@path) { $basedir = join("\/",@path); # e.g. /users/dbbrowse/WWW/DEALQUERY } else { $basedir = "."; } $pcommon = "$basedir/../LIB"; $ppages = "$basedir/pages"; $pcgibin = "$basedir/cgi-bin"; $pjava = "$basedir/../JAVA"; $linkpages = "/var/shares/ip/refacct/hp"; $hostname = `hostname`; chop($hostname); # remove \n; } use vars @EXPORT_OK; use lib "$pcommon"; use Msg; use Client; use Querier; my $help = <