http://qs321.pair.com?node_id=1200644


in reply to perl parsing

You've been given a solution that presumably works fine, but I would like to comment with a side note.
my @file = `cat text.txt`;
Calling the system or shell for reading the file is really poor practice in Perl (except possibly for command-line one-liners). Perl offers all the tools to do that with much better control on what happens and what to do if something goes wrong.

Look at the way poj opens and reads the file in pure Perl, that's much better.