If you know in advance how many fields to expect you can specify the limit parameter to sort.
If you don't you can determine the number with something like
and $count will have your limit.my $tstr = $str; my $count = $tstr =~ s/\*\*//g;
In reply to Re: Split a string with multiple trailing delimeters?
by mikeraz
in thread Split a string with multiple trailing delimeters?
by haolecoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |