in reply to Re^2: Reporting entries in a file
in thread Reporting entries in a file

@words = split(/\n+/);

I guess you meant: @words = split(/\s+/);