in reply to File Copy with Array

I assume you are using File::Copy?

You say you checked the existance of $GraphicsDirectory - are you sure the source is the problem? Could it be that the non-existant part is $pparent/$path/images/$line?

Can you put a statement like

print "<$GraphicsDirectory><$line><$pparent/$path/images/$line>\n";
in your loop and see if it returns reasonable values?

The < and > are there so you can tell if any of the values are empty and where each variable begins and ends.

Replies are listed 'Best First'.
Re: Re: File Copy with Array
by NaomiG (Initiate) on Apr 14, 2004 at 20:17 UTC
    Thanks everyone for the help. It turned out that the array was picking up a line feed from the text input file and trying to copy that as well. Using the < >'s helped because I noticed that the line kept breaking. I used a chomp function, and that seemed to take care of it. Thanks again! Naomi