# Get all the asterisk-separated pieces my @pieces = split "\*", $str; my $pos = length $pieces[0];