Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Homework Golf

by BrowserUk (Patriarch)
on Dec 04, 2013 at 02:39 UTC ( #1065522=note: print w/replies, xml ) Need Help??


in reply to Homework Golf

57

54


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Homework Golf
by Athanasius (Archbishop) on Dec 04, 2013 at 04:17 UTC

    The second solution has a problem: each chop reduces $_ by one character until $_ is the empty string — which is what gets printed when $n is 65. My fix has 59 characters:

    But the first solution can be reduced a little to 54 characters:

    #23456789_123456789_123456789_123456789_123456789_1234 perl -nlE"$n=0;map$n+=$_-96,unpack'C*',$_;$n==65&&say" words.txt

    :-)

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2023-09-26 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?