"Ron Bergin" writes:
> As has already been mentioned, part of the problem is your quoting.
> 
> What is the value of $directories and more specifically, does it end with
> a forward slash?  Personally, I prefer to leave off the trailing dir
> separator because IMO it makes it more clear later when the $filename is
> added.

        You'll see in a previous message that I really goofed.
The $filename variable contained the correct string but also
contained a newline at the end so chomp was in order. I removed
all quotes except for the beginning and ending quotes in the
system command.

        I am certainly saving all the suggestions that various
members of this list have sent because this may come up again
some day as the same problem for a different reason.

> Why are you using a system call instead of the more portable move() of
> mv() function from File::Copy, which is a core module?
> 
> use File::Copy qw(cp mv);

Easy answer: I didn't know any better. I've been working with
perl to really learn it for about a year and didn't know it
existed as I didn't need it until now.

        Many thanks to all.

Martin McCormick

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to