in reply to File::Find Problem

If your directory name is something like  My Silly Folder Name (i.e. four words, three spaces), then you must put quotes around the full name on the command line when you run the perl script -- otherwise, the shell will pass the name to perl's @ARGV as four separate args (that is: @ARGV[0..3]).

I guess another way to handle this (without qouting the directory name on the command line) might be:

my $root_dir = join " ", @ARGV;

In any case, your attempts at putting quotes around $ARGV[0] have no effect at all on the issue.

Replies are listed 'Best First'.
Re^2: File::Find Problem
by MidLifeXis (Monsignor) on Aug 11, 2006 at 17:31 UTC
    I guess another way to handle this (without qouting the directory name on the command line) might be: my $root_dir = join " ", @ARGV;

    Until you pass a file named: two  spaces or a\ttab (replace "\t" with an actual tab). Any assumptions that the program makes as to the whitespace of unquoted parameters is just asking for trouble.

    --MidLifeXis