in reply to Re: Golf: string complement
in thread Golf: string complement
sub invert { #23456789012345678901234567890 grep/[^\Q@_\E]/,map{chr}1..255 }
cLive ;-)
updare - to summarize response to BrowserUK's comment - calling the sub in scalar context will automatically join the list into a scalar. Is that cheating? maybe :) - never mind, I was running the wrong test script lol :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re:^2 Golf: string complement
by BrowserUk (Patriarch) on May 15, 2004 at 23:38 UTC | |
by cLive ;-) (Prior) on May 16, 2004 at 00:56 UTC | |
by BrowserUk (Patriarch) on May 16, 2004 at 01:23 UTC | |
by davido (Cardinal) on May 16, 2004 at 03:51 UTC | |
by japhy (Canon) on May 16, 2004 at 01:23 UTC |