in reply to Globbidy glob glob glob

It's returning "blank" (I'm guessing this means @files is empty) because no files matched. It's probably simply due to what you changed the variables to. Perhaps the path is relative and something called chdir, or the values you passed were expecting a different working directory.

Double-check what the variables are set to. If the path is relative make sure the current directory is what you expect. Make sure you have read permission for $file_directory/outgoing, and execute permission for all of the directories leading up to it.

Also, please, for the sanity of everyone having to read your code, use glob("$file_directory/outgoing/$new_files*.txt") instead of angle brackets.

Replies are listed 'Best First'.
Re^2: Globbidy glob glob glob
by jdporter (Paladin) on Oct 11, 2007 at 12:58 UTC

    Furthermore, check that the final glob pattern ("$file_directory/outgoing/$new_files*.txt") contains no spaces. The glob function, by default, treats spaces specially: it splits the string at spaces into one or more patterns.

    C:\>perl -w -e "print qq($_\n) for glob('C:\Documents and Settings\*') +" C:./Documents and
    A word spoken in Mind will reach its own level, in the objective world, by its own weight