ISAI student has asked for the wisdom of the Perl Monks concerning the following question:

See the LINUX log below: Directory evgeny (which belongs to user evgeny) is not found by glob. After doing cd evgeny and cd ../, glob find it.

evgeny@analog4 620 > perl -e 'print join("\n",( glob "*")), "\n";' arielg cad canalog2 izika laycont1 laycont2 liord maora shimons evgeny@analog4 621 > cd evgeny evgeny@analog4 622 > cd ../ evgeny@analog4 623 > perl -e 'print join("\n",( glob "*")), "\n";' arielg cad canalog2 evgeny izika laycont1 laycont2 liord maora shimons
Any ideas?

Replies are listed 'Best First'.
Re: glob does not find non mounted directories
by SuicideJunkie (Vicar) on Nov 09, 2011 at 17:12 UTC

    I'm not sure I see the problem.

    You mention that the directory isn't mounted the first time you run the script. How could glob possibly detect things which do not exist in the directory yet?

    Surely it should not try and rifle through your system files to figure out if something will auto-mount, or poke every possible directory name to see if it appears.