remove warnings with perl-5.18 for for/when statements