Guessing at the definition of the problem based on your examples, here's one simple way:
sub decomp_str { my $str = shift; $str =~ s/\s([a-z])\s/$1;$1/gi; [ split /;/, $str ]; }
Hugo
In reply to Re: Decompose a String into Tuples (Faster and Compact Way)
by hv
in thread Decompose a String into Tuples (Faster and Compact Way)
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |