foreach my $it ( @eles ){ foreach my $part ( split '|', $it ){ ....; } }