The test snippet you showed us is difficult to decipher, since it's incomplete, and since there's a runaway quote in line 1 and 2. But one thing that is certainly a bug is this line:
$text =~ s/^[---]+//;
The biggest issue here is that you're repeating the hyphen inside of a character class, which is not useful. You probably intended something like this:
$text =~ s/^(?:---)+//;
The line right above that is flawed as well; you can't use (and don't need) alternation inside of character classes. The '|' character inside of a character class is just like any other character; it doesn't have any special meaning.
If fixing those problems doesn't help, you should post a complete snippet of code that will compile, and that we can actually run to see what the problem is. And the snippet should be no more than 20 lines of code.
Update: Could you explain what was wrong with the answers you received to the exact same question posted 16 hours earlier? (Split using special charater data type scalar)
Dave
In reply to Re: Split using special charater data type scalar
by davido
in thread Reaped: Split using special charater data type scalar
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |