#!/usr/bin/perl # Jaideep Singh # October 2003 #INPUT: reads the perl script that you used to create your run summary variable data file AND then creates a "key" file to interpret the data file #in this case the input is "get_right_end.perl" #OUTPUT: a "key" file named "temp.key" # #(easily the coolest perl script i've ever written) my $n = 0; my @count = (0) x 1000; open(PRLFILE,"get_right_end.perl"); while () { if (/(if \(\/(.*)\/\)).*/) { $temp = $2; for ($j=1;$j<20;$j++) {$temp =~ s/\([^ABCDEHPSao]{2,5}\)/\*\*/}; $temp =~ s/\temp.key"); print KEYFILE "Key for left start of run data summary table\n"; print KEYFILE "\$n refers to the nth field in the raw data file\n"; print KEYFILE "this notation is useful for use with awk\n\n"; for ($k=0;$k<$n;$k++) { $temp = $ifarr[$k]; for($i=0;$i<$count[$k];$i++) { $num = 1+$datarr[$k][$i]; $temp =~ s/\*\*/\$$num/; }; print KEYFILE "$temp\n"; }; print KEYFILE "Log book entry time is secs from midnnight April 20 \: \$281\n"; print KEYFILE "Run stop time is secs from midnnight April 20 \: \$282\n"; print KEYFILE "Number of beg of run summary files for this run \: \$284\n"; close(KEYFILE);