Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
We all learn at different speeds and many times the speed we learn at is proportional to the time we spend. If your life is busy and you only get a little bit of time to spend on this, the natural result is that it'll take longer to learn. That's natural and there's nothing wrong with that. I do applaud your willingness to hang in there and continue; I'm sure that determination will get you where you want eventually.

As to your problem, looking at and understanding classic problems is a decent way to learn. Many of us wouldn't solve it that way, but that's because we're probably trying to solve a business problem and not teach ourselves something. We'll grab the first thing that works and use it.

As I'm lazy, I'd probably just use the hash and do:
@arr = ( defined in the problem... ); %h = map { $_ => undef } @arr; print join(" , ",keys(%h)), "\n"';
There's probably even a way to do that in 1 line, but again, I'm lazy. :)

Besides all the other good advice you've been given, I'll add 1 more I didn't see (my apologies to anyone if I overlooked this in your post).

I believe someone did say they keep snippets of code, which we all do, but I'll advise you to go further. I actually keep a notebook of code examples and explanations from PerlMonks/blogs/web-searches/books/etc for reference, not to mention little things I've found on my own over time that are helpful. I put it in an electronic notebook for easy searching and organization (I use OneNote, but use whatever works for you). It's grown over the years and has become a helpful companion along the way -- a trusty toolbox of tips and tricks and reminders.

Good luck in your journey, and sign up and join us here too. :)

In reply to Re: Trudging along the learning perl path. by kbrannen
in thread Trudging along the learning perl path. by Anonymous Monk

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (5)
    As of 2019-07-18 21:34 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found