in reply to Re: (Ovid - reading files) Re: File globbing to a different directory
in thread File globbing to a different directory

I have no idea why your approach failed. It looked fine to me. Now that I stop to think about it, I can't see why mine would have worked when your's failed. The benefit of using opendir is that it assigns to $! when it fails. File globs and the glob function don't do that (at least, not that I'm aware of).

Side note: it's considered cleaner to check for files using the glob function instead of the file globbing operator. I should have suggested that first.

When you said that it failed, how did it fail? Was there anything populating your @photos array?

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

  • Comment on (Ovid) Re(3): File globbing to a different directory