Please read How (Not) To Ask A Question.

You write

The script I am using is below, I think the problem is at the split function (line 17). Is this right?

Yet you don't tell us what problem the script as a whole has.

When you have a suspicion where the proble might be, just add some debugging output. For example Data::Dumper can help you to analyze data structures.

use Data::Dumper; print Dumper \@chunks;

For writing the script you surely must have a mental model of what should be inside @chunks. Looking at the debugging output will tell you if the actual data in that variable matches your mental model. That way you can answer the question yourself if the line with the split is your problem.

It seems you have been working on this problem for three weeks now, and haven't made much progress. Did you just wait for to solve your problem? Or are you truly in a dead end?

If the latter is true, you should take some programming courses or maybe read one or more good books on programming.

We'll happily help you to answer programming questions, but only if you also put effort into answering these questions yourself.


In reply to Re: split function problem by moritz
in thread split function problem by $new_guy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.