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

Re: Re: Re: "Countdown" (golf)

by blakem (Monsignor)
on Nov 30, 2001 at 15:11 UTC ( [id://128598]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: "Countdown" (golf)
in thread "Countdown" (golf)

The regex needs a '?' on the end... Its the difference between /^a?b?c$/ and /a?b?c?$/. Looking at it again, I only need to add one char to get it back though: 62 chars
# 1 2 3 4 5 6 #2345678901234567890123456789012345678901234567890123456789012 $;=join'?',sort@_;grep{chop;(join'',sort split//)=~/^$;?$/}<D>
Ah, but I can get it back with a little rearranging.... 61 chars
# 1 2 3 4 5 6 #234567890123456789012345678901234567890123456789012345678901 @_=sort@_;$"='?';grep{chop;(join'',sort split//)=~/^@_?$/}<D>

-Blake

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found