open my $zielFH, '>', 'passwd_onlyInit'; foreach (@csv) { print $zielFH $_ if m/^\w\..+/; } close $zielFH