in reply to
Could this be related to exercise 4.4 of exercise solutions (part of a Perl course taught at CNTS - Computational Linguistics at the University of Antwerp)?
The problem to solve is:
Write a program that reads text from standard input until end-of-file, and then prints the frequency of each bigram that occurs in the text. And this without hashes.
If that is indeed the "solution" to this problem, it is not working.
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics