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

Re^3: RFC: Perl Learning Plan

by eyepopslikeamosquito (Archbishop)
on Jun 29, 2021 at 08:38 UTC ( [id://11134429]=note: print w/replies, xml ) Need Help??


in reply to Re^2: RFC: Perl Learning Plan
in thread RFC: Perl Learning Plan

Great to have you back Leitz!

I find it fun (and helps with motivation) to define a specific arbitrary problem and post my solution/s here at Perl Monks, inviting others to join in and/or give feedback.

For a simple one to get you started, write a function to reverse a string of words. For example, given an input string of:

" one two three four "
your function should produce:
"four three two one"
That is, the input string reversed word by word, with a single space between each word and with no leading or trailing space. You may assume the input string consists only of alphabetic characters, spaces and tabs.

When you're done, take a look at the many instructive replies at: Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell) ... wow, just remembered this challenge provoked a Perl 6 reply from The Larry himself (aka TimToady)!

Some more examples of this approach:

Conway's classic Game of Life was my favourite, I became a bit obsessed with it - being a meatier problem, it took way more time than the others. Sadly, John Horton Conway, the inventor of the Game of Life, died last year of COVID-19.

Replies are listed 'Best First'.
Re^4: RFC: Perl Learning Plan
by Leitz (Scribe) on Jun 29, 2021 at 14:16 UTC

    eyepopslikeamosquito, it is good to be back! Thank you for the welcome.

    I tend to pick a task that I need doing, it provides motivation. Since I write fiction and play role-playing games, most of my tools revolve around that. For example, my current challenge is to build a set of modules and an app that can go on CPAN. The tool will collate sections of a book, do some formatting, and produce grade-level and word count reports. There is an aspect of "My personal work is part of my resume", so I've started another meditation to push my personal work to be even better.

    Chronicler: The Domici War (domiciwar.net)

    General Ne'er-do-well (github.com/LeamHall)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-03-28 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found