Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Perl Puzzles

by oko1 (Deacon)
on Oct 11, 2010 at 02:18 UTC ( #864530=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Perl Puzzles
in thread Perl Puzzles

Oh, dear. Too bad I wasn't around for that one - my off-the-cuff solutions seem to be a good bit shorter than the ones presented there. {sigh} Oh, the things I lose out on by not having a time machine...

# Perl $ perl -wlne'print "@{[reverse split]}"' one two three four four three two one # Bash, as a script #!/bin/bash a=($@);for ((b=${#a[*]};b>=0;b--)); do c+=(${a[$b]}); done echo ${c[*]}

Not that this addresses the original question. :)

Back on topic: some years ago, Mark-Jason Dominus ran a "Quiz-of-the-Week" mailing list in which he came up with interesting challenges for Perl hackers. As I recall, he wasn't able to continue it; some other people tried carrying it (Shlomi Fish among them, IIRC), but it eventually died off. While it lasted, however, it was quite a bit of fun - it might be worth your while to take a look at the archives and see if anything strikes your fancy.


--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf


Comment on Re^4: Perl Puzzles
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2015-07-02 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls