|There's more than one way to do things|
split with separators but dont include in the arrayby anniyan (Monk)
|on Oct 17, 2005 at 15:23 UTC||Need Help??|
anniyan has asked for the
wisdom of the Perl Monks concerning the following question:
I have a string like$str = '<chap&&<book||<table&&<list';
I want to split that with && and || but i dont want to include those && and || in the array.
If i use the following code, it splits correctly but it stores the && and || in the array.@arr = split /(?=(&&|\|\|))/, $str;
How to do this?