#!/bin/perl # $Header: perldb,v 1.0.1.1 88/01/28 10:27:16 root Exp $ # # $Log: perldb,v $ # Revision 1.0.1.1 88/01/28 10:27:16 root # patch8: created this file. # # $tmp = "/tmp/pdb$$"; # default temporary file, -o overrides. # parse any switches while ($ARGV[0] =~ /^-/) { $_ = shift; /^-o$/ && ($tmp = shift,next); die "Unrecognized switch: $_"; } $filename = shift; die "Usage: perldb [-o output] scriptname arguments" unless $filename; open(script,$filename) || die "Can't find $filename"; open(tmp, ">$tmp") || die "Can't make temp script"; $perl = '/bin/perl'; $init = 1; $state = 'statement'; # now translate script to contain DB calls at the appropriate places while (