Hail, perl monks! I am once again at the temple seeking wisdom I beg your endulgence! Running active perl on windows, I need to duplicate the "uniq -c" function of the gnu utilities! This function prints all lines of input bar repeated lines, the "-c" part counts the number of times each line was found and prints that number out along with the line e.g. 4 "hello". I need to do this within a while loop! I can do the first part by using a $oldline variable thereby only printing lines that are not the same as the previous one but I am struggling counting the number of hits? Your help would be greatly appreciated!