Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Trudging along the learning perl path.

by kbrannen (Beadle)
on Apr 21, 2017 at 15:08 UTC ( #1188552=note: print w/replies, xml ) Need Help??

in reply to Trudging along the learning perl path.

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. :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1188552]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2019-07-22 22:24 GMT
Find Nodes?
    Voting Booth?
    If you were the first to set foot on the Moon, what would be your epigram?

    Results (21 votes). Check out past polls.