vishwa has asked for the wisdom of the Perl Monks concerning the following question:

Hi All, I need technical assistance on PERL. I am getting XML file whose size is not fixed. Now I need to split this XML files into 19.5 MB and store it in a file named file1 If the incoming file is more than 19.5 MB then it has to create another file named file2 and so on. I need to write PERL script to achieve this functionality. Need help. Thanks in advance.

Replies are listed 'Best First'.
Re: Splitting XML files into 19.5 MB
by jmcnamara (Monsignor) on Sep 25, 2008 at 09:22 UTC

    The xmlsplit utility that is part of XML::Twig might help. It has a -s size option.

    --
    John.