in reply to Split a string with multiple trailing delimeters?

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

my $tstr = $str; my $count = $tstr =~ s/\*\*//g;
and $count will have your limit.

Be Appropriate && Follow Your Curiosity