in reply to Re^2: perl glob and an exception
in thread perl glob and an exception

So, what is your question? If there is no exception, you can't catch it either.

Maybe you wanted to ask how glob can tell you whether there was a problem with one of the filespecs?

For that, you will have to use opendir and readdir instead, and check for errors yourself.

Replies are listed 'Best First'.
Re^4: perl glob and an exception
by proxy-man (Initiate) on Sep 25, 2015 at 09:55 UTC
    You are right, Sir :) The question was about - how glob can tell me if there is an issue with a file system. E.g. I don't have a permissions etc.
      :)see glob does what it does, if you want something different, make your own sub glob

      How about combining glob with grep?

      my @readable = grep { -r } glob "*.txt";

      OK, so you'll have to implement a bunch of tests if you want check multiple things, but that's because glob - for efficiency reasons - does nothing other than read a directory (See: perldoc -X)