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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: how to split html file?
by JavaFan (Canon) on May 12, 2010 at 10:24 UTC
    $ man split NAME split - split a file into pieces SYNOPSIS split [OPTION] [INPUT [PREFIX]] DESCRIPTION Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; + default PREFIX is ‘x’. With no INPUT, or when INPUT is -, read standar +d input. ....
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: how to split html file?
by ww (Archbishop) on May 12, 2010 at 10:30 UTC
    And your criterion for 'where to split' is what?

    As to how, read split.

Re: how to split html file?
by nagalenoj (Friar) on May 12, 2010 at 10:30 UTC
    Why don't you give the search engines, a testcase with your question, first?!

    Since this is not a very tricky question, you could find many help instantly.

Re: how to split html file?
by graff (Chancellor) on May 12, 2010 at 22:02 UTC
    If you want each of the parts to end up as a valid html file on its own, this could be a very tricky process. An html parsing module would be required, along with a fairly good knowledge of the original html structure and content, and some fairly clear and detailed notions about how to establish cut-off points and how to distribute information among the output files. It could get very ugly.

    If you just want to break a stream of bytes into two or more pieces, such that when the pieces are put together again you get the original file, then it's just a question of how many pieces you want, or (equivalently) how large each piece should be, copying right quantity of data from the input to each distinct output file.

    So, what are you actually trying to accomplish by splitting an html file into pieces?

Re: how to split html file?
by sierpinski (Chaplain) on May 12, 2010 at 12:15 UTC