Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Golf for unique digits

by BrowserUk (Pope)
on Jan 10, 2013 at 09:58 UTC ( #1012635=note: print w/replies, xml ) Need Help??


in reply to Re: Golf for unique digits
in thread Golf for unique digits

This saves 2 strokes over yours:

perl -plE"@h{/./g}++;$_=keys%h"

And this saves 2 more over your version of tye's:

perl -lpE'$_=s/(.)(?!.*\1)//g'

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^3: Golf for unique digits
by eyepopslikeamosquito (Chancellor) on Jan 10, 2013 at 10:15 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012635]
help
Chatterbox?
[Lady_Aleena]: That's not fair
[Lady_Aleena]: I was thinking about moving WorldBuilding to Random, since it is all randomness in that group anyway, but Random::World is the same length as WorldBuilding. I wouldn't be doing myself any favors.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-05-25 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?