Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: what's this loo code? (*slurp*)

by Kanji (Parson)
on Feb 04, 2003 at 18:51 UTC ( #232619=note: print w/ replies, xml ) Need Help??


in reply to Re: what's this loo code? (*slurp*)
in thread what's this loo code?

I'm almost certain you can make that faster or shorter

I can't imagine it making a significant dent in speed for small(er) files, but -l (sh|c)ould be omitted.

Perhaps...

perl -ne 'END{ print $., $/ }' file

...or...

perl -ne 'END{ print $. }' file

    --k.



Comment on Re: Re: what's this loo code? (*slurp*)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2015-07-06 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (80 votes), past polls