Re: Comments on Cipher Minigolf
[email protected] ("Keith C. Ivey")
| Newsgroups | perl.golf |
|---|---|
| Message-ID | <3EAAF04E.28985.860B498C@localhost> |
Daniel Tuijnman <[email protected]> wrote: > To add another trick: > > 8) Using !~ instead of =~ when you're in list context > > I tried a solution like k.c.ivey's but didn't think about this one... I discovered that one accidentally. Initially I used the !~ in a solution with s///, where I actually needed a '' to be returned so I wouldn't print anything for a match at the end. Then I realized it maintained scalar context, and saved me a stroke from the $k=~s/.// I was using earlier in the map() solution. The $^H (with literal chr(8)) in my solution was left in by mistake. I would have used a plain 99, except that in my s/// solution the number had to be at least 100. I'm still not sure when I can rely on $^H being 256. I wouldn't have put in a gratuitous unprintable character intentionally. -- Keith C. Ivey <[email protected]> Washington, DC