while (my $file = readdir ($ls)) {    if ( !(-d $file)){