#!/usr/local/bin/perl -w-- # -*- perl -*-
#
# $Id: gdbmcat,v 1.1 1994/09/27 21:58:34 ejb Exp $
# $Source: /home/ejb/scripts/RCS/gdbmcat,v $
# $Author: ejb $
#

# This code, from the perl manual page, forces this to be run by perl from 
# perl, sh, or csh.  It must be first.
eval '(exit $?0)' && eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
& eval 'exec /usr/local/bin/perl -S $0 $argv:q'
    if 0;

$whoami = ($0 =~ m,([^/]*)$,) ? $1 : $0;
&usage unless (@ARGV == 1);
($file) = (@ARGV);

use GDBM_File;

tie(%h, GDBM_File, $file, &GDBM_READER, 0);
for (keys %h)
{
    print "$_ -> $h{$_}\n";
}

sub usage {
    print STDERR "Usage: $whoami file\n";
    exit 1;
}
