in reply to Splitting on escapable delimiter

So, this is more of a follow-up question than an answer. I tried:
use strict; use warnings; { my $var1 = "####@#####@##@###@######@###"; print "START '$var1'\n"; my @foo = split /(?<=[^#]((##)+))[@]/, $var1; foreach (@foo) { print "HERE: '$_'\n"; } }
But I got the error message: "Variable length lookbehind not implemented in regex;". Is this an ActivePerl thing (that's what I'm using), a Perl v5.8.8 thing, or did I do something boneheaded and just didn't see it?
--
Wade

Replies are listed 'Best First'.
Re^2: Splitting on escapable delimiter
by BrowserUk (Patriarch) on Mar 28, 2008 at 15:31 UTC

    Did you notice the bit highlighted below in the post where you got that regex from?

    Intuatively, you want to use split '(?<=(?:##)+)\@', $s;; but that gets you:

    [Variable length lookbehind not implemented in regex; ...


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Doh! No, like an idiot, I looked at the problem and thought "I can solve that!". Thanks!
      --
      Wade