Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.

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,

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



      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.


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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-07-19 10:13 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (406 votes). Check out past polls.