in reply to Coming across an issue with glob. Is only able to find every other directory.
Your program works fine under Linux (OpenSUSE 12.3) and Perl 5.14.1 if you ignore the
undefined warnings.
Hint: do this in the good-branch: my $moving_code = (split("/",$moving_code_dir))[-1];).
It could be a Solaris issue. Which Perl version do you use?
From File::Glob:
Since v5.6.0, Perl's CORE::glob() is implemented in terms of bsd_glob(). Note that they don't share the same prototype--CORE::glob() only accepts a single argument. Due to historical reasons, CORE::glob() will also split its argument on whitespace, treating it as multiple patterns, whereas bsd_glob() considers them as one pattern.From perlport:
Don't count on filename globbing. Use "opendir", "readdir", and "closedir" instead.HTH
|
|---|