#!/usr/bin/perl

use 5.038.2;

my ($files, $dirs) = (0,0);
if ($ARGV[0] =~ /f/i){
    $files = 1;
}
if ($ARGV[0] =~ /d/i){
    $dirs = 1;
}

my $pattern = "*";
my @files = glob ($pattern);

for (@files){
#    next if (/\./g);   # not dot files and dirs
    next unless (($files && -f $_) || ($dirs && -d $_));
    chomp;
    say $_ if ($files || $dirs);
}

exit 3;

__END__
  
Notdot files are prone to be scripts or text files in n*x env.
  So, show them up!
  


