if ( !grep{ $_ == $monthnr }@range ) { open(NEWWTMP,">>$newwtmp"); print NEWWTMP $_; }