Re: renaming a file while using copy using regex

2007-07-18 Thread Paul
On Wed, July 18, 2007 3:58 pm, John W. Krahn wrote: > Paul wrote: >> I have a line that is reading files from and array and copying to a >> different directory. Is there a way to rename the file with regex at >> the >> same time? > > No, you have to store the modified file name in a different vari

Re: renaming a file while using copy using regex

2007-07-18 Thread Chas Owens
On 7/18/07, Paul <[EMAIL PROTECTED]> wrote: I have a line that is reading files from and array and copying to a different directory. Is there a way to rename the file with regex at the same time? I'm wanting to remove spaces only in the filenames with: s/\ //g My copy line reads: copy( "$dir/$

Re: renaming a file while using copy using regex

2007-07-18 Thread John W. Krahn
Paul wrote: I have a line that is reading files from and array and copying to a different directory. Is there a way to rename the file with regex at the same time? No, you have to store the modified file name in a different variable. I'm wanting to remove spaces only in the filenames with: s

renaming a file while using copy using regex

2007-07-18 Thread Paul
I have a line that is reading files from and array and copying to a different directory. Is there a way to rename the file with regex at the same time? I'm wanting to remove spaces only in the filenames with: s/\ //g My copy line reads: copy( "$dir/$file", "$newdir/$file" ); If I need to work w