open(FILE,'41084109.udp'); $/=\4; while() { #count the occuarnce of the 4 digits $count{$_}++; }