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,
2009/6/24 Daniel Tiefnig dan...@gmx.at:
perl -00 -ne'/.{65535}/||print'
of course becomes
perl -00 -pe'$_ x=!/.{65535}/'
--
Jasper
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
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
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
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
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