#!/usr/bin/perl -w # # dump_header # # Quick hack to satisfy my curiosity about the header files # generated by strfile and used by fortune. (The Fortune # module is essentially a puffed-up, glorified version # of this, with the added ability to read actual fortune # files based on the offsets from the header file.) # # by Greg Ward, 1999/02/20 # # $Id: dump_header,v 1.1 1999/02/20 18:56:04 greg Exp $ # die "usage: dump_header header_file\n" unless @ARGV == 1; open (D, $ARGV[0]) || die "couldn't open $ARGV[0]: $!\n"; undef $/; $d = ; @d = unpack ("NNNNNaxxxN*", $d); print <