On Wed, Jan 09, 2002 at 02:22:57PM -0500, Patrick Gaskill wrote:
:
:There's an article about CETI's next message into space
:
:  http://slashdot.org/article.pl?sid=02/01/08/231247&mode=nested
[ snip ]
:
:My attempt, at 79 characters:
:$\=$/;undef$/;$_=<>;s/.{70}//s;tr,01\n,\x00\xff,d;print$1while/(.{1,127})\n?
:/g;

Here's my go at 45 characters (including command line switches):

  perl -0lpe's/^.{71}|[\n\r]//gs,s/(.{127})/$1\n/g' stream.txt

If you pipe the output to less and scroll down at a consistent pace,
it's readable.

  Casey West

-- 
"I have traveled the length and breadth of this country and talked
with the best people, and I can assure you that data processing is a
fad that won't last out the year."
 -- The editor in charge of business books for Prentice Hall, 1957

Reply via email to