in reply to Array slice vs foreach and push

This should meet your readability and efficiency criteria :
use strict; use warnings; my @chars = qw( a b c ? : ! f g ) ; my %upchars ; @upchars{@chars} = ( 'A', 'B', 'C', undef, undef, undef, 'F', 'G' ); +# getUpperCaseChars( @chars ); my @charsWithNoUpperCase = grep {! defined $upchars{$_} } @chars;

            "XML is like violence: if it doesn't solve your problem, use more."