@words = split(/\n+/);
I guess you meant: @words = split(/\s+/);
In reply to Re^3: Reporting entries in a file by alexm in thread Reporting entries in a file by SkullOne