#!/opt/perl5/current/bin/perl
chdir "/tmp/test";
$CONFIG = "some_string_with_no_filename_wildcards";
@files = glob("$CONFIG");
foreach $file (@files) {
next unless -e $file;
print "$file \n";
}
####
foreach $file ( grep {-e} @files ) {
print "$file\n";
}
####
@files = ( $CONFIG =~ /[*?]/ ) ? glob( $CONFIG ) : ( -e $CONFIG ) ? ( $CONFIG ) : ();