# @input assumed by statement of requirement my %done = (); my @output = (); for ( @input ) { unless( $done{ lc( $_ ) } ) { push @output, $_; $done{ lc( $_ ) } = 1; } }