A regex would be simplest...
push @splitted, $1 while $str =~ /([^=]+=[^=]+)/g;
... but you could do it with split, too, if you didn't mind a temporary array and some post-split massaging ...
my @temp = split(/=/, $str); push @splitted, join("=", splice(@temp,0,2)) while @s;
--k.
In reply to Re: Splitting on Every Second Occurence
by Kanji
in thread Splitting on Every Second Occurence
by mt2k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |