"it could't show the full content"
Neither does your question provide "full content" when the phrase is used to mean "a clear description" of your problem.

The split you show, executed against the source string (presumptively $cont is the string you showed initially), produces an array as you appear to expect. The content of that array, via Data::Dumper, is:

$VAR1 = '<P_contrib-author>Allan Wigfield'; $VAR2 = ','; $VAR3 = ' Susan L. Klauda'; $VAR4 = ','; $VAR5 = ' '; $VAR6 = 'and'; $VAR7 = ' Jenna Cambria</P_contrib-author>';

So... is your question

WAG: You might find producing the desired output easier if you deal first with the tags and the substantive content. If your data is uniform -- contains (identical) <P_contrib-author> tags each time you need to extract authors -- identify, modify, and strip them out for your later use before dealing with the authors list.

But, I suspect the style of your data will vary from item to item... omitting the Harvard comma, using an ampersand instead of "and" and so on... so the overall solution won't be a single PATTERN for use in split, anyway.


In reply to Re: split function using multiple delimiters by ww
in thread split function using multiple delimiters by maha

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.