En op 11 augustus 2002 sprak Phil Carmody: > I'd just realised > perl -pe '$_=y/o |./10/d&&pack(B8,$_)' > works. Not if the top and bottom lines are present in your input: $ cat ascii ___________ | o . o| | o o . oo| | o . oo| | o o. o| | o o. o| | o. o | ___________ $ perl -pe '$_=y/|.//d&&pack(B8,$_)' ascii 0ASCII 0$ > --- Eugene van der Pijll <E.C.vanderPijll@phys.uu.nl> wrote: > > perl -pe '$_=y/|.//d?pack(B8,$_):""' > > perl -ne 'y/|.//d&&print pack B8,$_' perl -pe '$_=pack y/|.//d?B8:"",$_' perl -pe '$_=pack B8 x!!y/|.//d,$_' (-ugene -- It is when I struggle to be brief that I become obscure. -- |-|oraceThread Previous | Thread Next