#!/usr/bin/perl # Usage: countImdbMisses.pl < scriptOutput.txt $count = 0; while () { $count++ if !/tt\d+/; } print STDOUT $count . " IMDB lookups failed.\n";