It sounds as though you might employ your time better by reading a standard Perl primer -- Learning Perl from O'Reilly would be a standard example (and a darn good one) -- than by fighting with "a million lines of code attempts at this patched together from examples all over the internet...."
You may also want to visit our Tutorials for a selection of complimentary information.