in reply to text file reading

The getLine routine reads the file until it finds a non-blank line or end of file. You only called it once so you only read one line from the file. If you want to read them all, you need to loop on print $line->getLine(); until it returns undef.

90% of every Perl application is already written.