#!/usr/bin/perl -w # Checks text for e-prime compliance @banned{qw(am are is was were be being will be aren't wasn't isn't weren't)}=(); while(<>){ my @words=/[\w']+/g; my @warnings; @warnings=grep(exists($banned{$_}),@words); print "Line $. (\"".join(",",@warnings)."\"): $_" if @warnings; }