Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: split a file into number of file based on line count

by thiagu_mvt (Sexton)
on May 13, 2009 at 07:21 UTC ( [id://763694]=note: print w/replies, xml ) Need Help??


in reply to split a file into number of file based on line count

In Perl you can read the input file into a array and find the length of the array.(everyline is a scalar now)divide that into 5 and write those into five files one by one in a loop.
  • Comment on Re: split a file into number of file based on line count

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found