#!/usr/bin/perl # countdigraphs.pl # usage, to count the digraphs in foo.txt: # countdigraphs.pl < foo.txt $total = 0; $first = 1; while (<>) { chomp; s/\s+//g; @c = split(//,$_); for ($i=0; $i