develooper Front page | perl.golf | Postings from June 2009

Re: Another one-liner?

Thread Previous | Thread Next
From:
Daniel Tiefnig
Date:
June 24, 2009 12:22
Subject:
Re: Another one-liner?
Message ID:
4A422C3E.5080002@gmx.at
Phil Carmody wrote:
> I needed to remove blank-line-separated chunks of code from a text 
> file if those chunks contained any lines which were 'too long'.
[...]
> If you think how little it does, it's got to be one-linerable, no?

Should do the trick:

  perl -00 -ne'/.{65535}/||print'

lg,
daniel

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About