User:Rich Farmbrough/temp214

while(<>){ chomp; if (/(\d+):sub +([^ ]+)/){ $sub=$2; $line=$1; }  elsif (/^ (\d+)/){ $line=$1; }  if ($oldsub) { print $line-$oldline."\t\t$oldsub\n"; }  $oldsub=$sub; $oldline=$line; }
 * 1) perl sub length
 * 2) pipe in something like (grep -n "sub " ;wc )