User:Rich Farmbrough/temp214
Appearance
- perl sub length
- pipe in something like (grep -n "sub " <file>;wc <file>)
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;
}