#!/usr/bin/perl -n $s{$&}++while/\w{4,}/g}{print map"$s{$_}\t$_\n"x($s{$_}>1),keys%s