Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Problem with multiple loops

by Samy_rio (Vicar)
on Oct 24, 2006 at 12:30 UTC ( #580257=note: print w/replies, xml ) Need Help??


in reply to Problem with multiple loops

Hi chinamox, Try to use File::Split module.

use File::Split; my $fs = File::Split->new({keepSource=>'1'}); #####Based on Number of Lines my $files_out = $fs->split_file({'lines' => 1000},'E:\test\test.xml') +; #####Based on Number of Files my $files_out = $fs->split_file({'parts' => 10},'E:\test\test.xml');

I have tested in Windows only. Not in Unix.

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Replies are listed 'Best First'.
Re^2: Problem with multiple loops
by chinamox (Scribe) on Oct 24, 2006 at 13:26 UTC

    Do I have to install the File::Split module or is it part of the Default Perl package?

      I'd be a little wary of using File::Split since this is an assignment... afaik it's not part of the standard distrib, so, even ignoring whether getting a module to do all your work is really going to convince your tutor, it might present problems when showing your work.

      Tom Melly, tom@tomandlu.co.uk

        This was my fear as well. That said, in the future I will certainly keep Fill::Split in mind.

        Cheers,

        -mox

      It's not part of the standard distribution. You can check that by reading the perlmodlib man page that came with your version of Perl.

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580257]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2018-01-21 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (227 votes). Check out past polls.

    Notices?