in reply to
perl
A one-liner that will do this:
perl -ne '$count++ unless /\S/; print "$count\n" if eof' <filename
[download]
Comment on
Re: perl
Download
Code
Replies are listed 'Best First'.
Re^2: perl
by
Random_Walk
(Prior)
on Sep 03, 2004 at 07:49 UTC
A slightly shorter version
perl -pe '$c++ unless /\S/}{$_=$c'
Cheers,
Random.
[reply]
[d/l]
In Section
Seekers of Perl Wisdom