my ($success, $failure) = part { /^ERR/ } ; #### use List::Part; my @candidates = qw( !britney !paris bettie patti ); my ($hot, $not) = part { s{^!}{} } @candidates; print "hot: ", Dumper( $hot ), "\n"; print "not: ", Dumper( $not ), "\n"; print "stuff: ", Dumper( \@candidates ), "\n";