On Mon, Sep 22, 2003 at 10:29:14PM +0100, Rob Dixon wrote:
> Daniel Liston wrote:
> >
> > John W. Krahn wrote:
> >
> > > Or you could pare that down a bit.  :-)
> > >
> > > #!/usr/bin/perl
> > >
> > > #syntax:  unfold.pl filename > newfilename
> > >
> > > @ARGV or die "usage: $0 filename\n";
> > >
> > > $/ = ''; print for grep [ chomp, s/\n\s+/ /g, s/\z/\n\n/ ], <>;
> >
> > I like that line.  I will have to experiment with it.
> 
> Anything that John writes after a ':-)' should be taken
> with a (large) pinch of salt.
> 
> :-)

Chew on this one for a little while:

  perl -F'\n\s+' -p00lae '$_="@F"'

Though mindful of the forum, this will explain it, if need's be:

  perl -MO=Deparse -F'\n\s+' -p00lae '$_="@F"'

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to