in reply to Re: use of useless void in context
in thread use of useless void in context

\w is a lot less typing than a-zA-Z0-9_

You can cut down on back-whackin' by choosing a different delimiter: split m{</syscode>}i, $syscode, 2;

Update: johngg++. Added m. I often botch untested code.

Replies are listed 'Best First'.
Re^3: use of useless void in context
by johngg (Canon) on Feb 07, 2009 at 19:03 UTC
    split {</syscode>}i, $syscode, 2;

    According to the documentation, "If "/" is the delimiter then the initial m is optional" so once you choose a different delimiter I think you need the m. Therefore the code should be

    split m{</syscode>}i, $syscode, 2;

    I hope this is of interest.

    Cheers,

    JohnGG

      Since split always treats its first argument as a regular expression anyway you could also use a string:

      split '(?i:</syscode>)', $syscode, 2;