![]() |
|
No such thing as a small change | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
All right, I'll jump in. I'm not exactly a newbie, but I'm also not an 'expert' (fill in your own opinion on what an 'expert' is).
So without further ado, this is what I ended up with:
Looking at just the important line, I started with: Hmm, exactly 80 characters. But wait, I can use the default variable ('$_') rather than creating my own, so I'm now down to 71 characters. Ahh, there's more. 'foreach' can be written as 'for' taking me done to 67 characters: Not quite - I can get rid of those pesky brackets by reversing the 'for' and 'print' statements, reducing it down to 65 characters:
And that's as far as I've gotten. I've noticed that my solution got more 'perlish' (albeit not much) as I went along, so I was hoping that some of our more experienced monks would contribute as well - and notes as to how you got there are most welcome. Most Perl golf I see is from a realm I'm not familiar with, so a map to that wonderful place would be appreciated greatly. Pat P.S. Viewng my post in VIM with syntax checking on leads to some strange colored text... In reply to Re: perl puzzle - cartoon couple registry (beginner, semi-golf)
by BlueBlazerRegular
|
|