Re: Another one-liner?

2009-06-25 Thread yanick
On Wed, Jun 24, 2009 at 06:59:41PM +0200, Eirik Berg Hanssen wrote: yan...@babyl.dyndns.org writes: I'm probably overlooking something silly, but perl -O0 -pe's/.{65535,}//' ? Newlines. Arrgh. I knew I was forgetting something. Darn, foiled again! Joy,

Re: Another one-liner?

2009-06-24 Thread Jasper
2009/6/24 Daniel Tiefnig dan...@gmx.at:  perl -00 -ne'/.{65535}/||print' of course becomes perl -00 -pe'$_ x=!/.{65535}/' -- Jasper

Re: Another one-liner?

2009-06-24 Thread Eirik Berg Hanssen
yan...@babyl.dyndns.org writes: On Wed, Jun 24, 2009 at 04:26:05PM +0100, Jasper wrote: 2009/6/24 Daniel Tiefnig dan...@gmx.at: ?perl -00 -ne'/.{65535}/||print' of course becomes perl -00 -pe'$_ x=!/.{65535}/' I'm probably overlooking something silly, but perl -O0

Re: Another one-liner?

2009-06-24 Thread Daniel Tiefnig
Eirik Berg Hanssen wrote: I'm probably overlooking something silly, but perl -O0 -pe's/.{65535,}//' Newlines. Besides that I'm getting Can't do {n,m} with n m in regex for values greater than 2^15 - 1 here. br, daniel

Re: Another one-liner?

2009-06-24 Thread Daniel Tiefnig
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? Here's one that does split on lines with whitespace too, but is much

Re: Another one-liner?

2009-06-24 Thread Daniel Tiefnig
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

Re: Another one-liner?

2009-06-24 Thread Philippe Bruhat (BooK)
On Wed, Jun 24, 2009 at 04:26:05PM +0100, Jasper wrote: 2009/6/24 Daniel Tiefnig dan...@gmx.at:  perl -00 -ne'/.{65535}/||print' of course becomes perl -00 -pe'$_ x=!/.{65535}/' Did you notice that this (x=!) is a secret operator of the same family as the screwdriver operators