my @chrs = split(//,$line); foreach my $chr(@chrs){ if($chr =~ /^[a-zäöüß0-9...]$/){ } }