Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 browsing the Monastery: (4)
As of 2014-07-13 09:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (248 votes), past polls