in reply to Re^4: Pascal-Sierpinski for golfers
in thread Pascal-Sierpinski for golfers
Doh, I flubbed that ($/ vs. $\). I so often print$/,/expr/?this:that, I confused myself.
And darn you - I had already read your lengthy linked topics, and perhaps all of their references, but I find them irresistable! This time through, I most enjoyed this gem:
s///ge>>9?print:do$0
The :do$0 is one *sick* loop. And the return value from s/// idea gave me the following "for 1 to 15" method:
perl -le'$_=1;{print,s/(\d+) ?/+$1 $1/g,s/\S+/$&/eeg>16||redo}'
A couple more tricks for me!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Pascal-Sierpinski for golfers
by eyepopslikeamosquito (Archbishop) on Dec 03, 2011 at 12:45 UTC |