I am spending my spare time trying to learn Perl, but I am finding it very difficult.

Yes, I understand, Perl's learning curve isn't exactly small, but once things start to click, IMHO it's a great language :-) (my favorite!)

the websites that I use to try to understand often quickly go over my head

You said you have the Llama book, that's good, if you're interested in more I can suggest Modern Perl, and see also So what is your Perl book "Trilogy" anyway?. And once you've gotten into Perl a little more, IMHO the Camel is a must.

Going forward I will take all advice given, including providing code that is tidy coincidentally, those indents are there only so I can read it better

Yes, I should have made it more clear that aside from those suggestions being helpful for those trying to help (especially standardized indentation), cleaning up your code will help you narrow down and focus on the issue you're seeing. In general, remove a line of code, if the problem goes away or changes, put the line back in, but if the problem doesn't change, then that line of code most likely wasn't relevant to the issue.

I just want to understand what is going on in the background so I have been copying bits of code from various places and trying to work out step by step what is going on

In that case, Data::Dumper or Data::Dump are great tools, I use them for watching my data and debugging all the time.


In reply to Re^3: How to get the key - value names from a hash by haukex
in thread How to get the key - value names from a hash by Scotmonk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.