in reply to copy files to the nonpermanent directory

Ok, first when putting code or text that should not change use code tags around it. Easier for us to read :).

But to problem. Easy way to compose paths (so that they are cross-platform, also) is by using File::Spec. In there commands rootfir,catdir and catfile would be what you want. Example:
use File::Spec; $dir1=catdir(rootdir(),$ver,$client,"qa"); # and for copy $old=catfile($dir,$file); $new=catfile($dir1,$file);
Then try the copy with command with die around it.
copy ($old,$new) or die "Unable to copy '$old' to '$new': $!";
Note what I added to the die. What is copied to where is a good idea, as it shows to you what actually is happening. Similar thing when trying to open files (print what is actually being tried). I've fixed a lot of my own mistakes like this ;).

UPDATE: as bart told, need to use File::Spec::Functions. Remember to ask for all commands you require.
use File::Spec::Functions (qw/catdir rootdir catfile/);

Replies are listed 'Best First'.
Re: Re: copy files to the nonpermanent directory
by Nelly (Novice) on Mar 24, 2004 at 12:16 UTC
    Thank you for responding, I've tried what you've sugested, but I recieved this error message: Undefined subroutine &main::rootdir called at C:\Perl\releaseqa3.pl line 4 ine 2. Thanks!!!!!!!
Re: Re: copy files to the nonpermanent directory
by Nelly (Novice) on Mar 25, 2004 at 09:39 UTC
    Thank you for everything, can you help one more time on that issue? When I try to copy file, I'm recieving error message: > >Unable to copy 'C:\perl\.' to 'C:\perl\begperl\qa\.': Bad file descriptor at C:\ Perl\releaseqa3.pl line 83, <> line 2. > >What does it means? >>THANK YOU AGAIN. p.s I'm new here, I don't know what is it code tags.