#!/usr/local/bin/perl -w # David MacKay # this takes the lit_rev.html of David Ward # and adds an index to it (called head) such that every # heading is in the index and clickable # then cats the two together eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; # $file = $ARGV[0] ; $filehead = $file.".head"; $filetail = $file.".tail"; $filetwo = $file.".2"; $l=1; print $filehead." opening...\n" ; open ( HEAD , "> $filehead" ) ; open ( TAIL , "> $filetail" ) ; do { $_ = <>; print HEAD $_ ; # # HEAD } while ( !(/drw1/) ) ; print HEAD "