Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl

by Fastolfe (Vicar)
on Nov 10, 2000 at 00:45 UTC ( #40814=note: print w/replies, xml ) Need Help??


in reply to perl

A one-liner that will do this:
perl -ne '$count++ unless /\S/; print "$count\n" if eof' <filename

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://40814]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2016-09-30 15:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (569 votes). Check out past polls.