in reply to Shell Commands executed in perl script
n.b. your original code will exclude any file for which file1 is a substring found anywhere in the ls -l line for the file - that's a lot of potential holes ... /^files1$/ operating on what the glob returns closes them all, /file1/ would exclude also any file where file1 is any substring of the filename. That seems almost but not quite as unlikely to DWYM under rigorous testing.print join ("\n", grep !(( -d $_ ) || /^file1$/ ), glob './logs/*' ) . + "\n";
^M Free your mind!
|
|---|