in reply to Seeking multiple defined files
This will return true for any item that can be said to "exist" in the file system. You may want to use -f to test if it's a file (versus, say, -d to see if it's a directory), etc. See _X for additional tests you can perform. Note also that $_ is implied, so you can leave that out: { -e }@existing_files = grep { -e $_ } @untested_files;
See the documentation for grep, which is what I would have done in the first place.# alternate syntax @exiting = grep(-e, @untested);
|
|---|