Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Count the number of lines in a file

by Plankton (Vicar)
on May 25, 2004 at 17:01 UTC ( [id://356291]=note: print w/replies, xml ) Need Help??


in reply to Count the number of lines in a file

You don't really need perl for this ...
$ wc -l existing_file > another_file
... but you can if you want ...
#!/usr/bin/perl -w my $file = shift; my @cmd = ( "wc", "-l", $file ); system( @cmd );

Plankton: 1% Evil, 99% Hot Gas.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found