in reply to Windows backslash problem

I would recommend using File::Copy:

use File::Copy; copy("a/b/*.txt","a/");

Update: I forgot that File::Copy doesn't do globs...

use File::Copy; my @list = <a/b/*.txt>; foreach my $file (@list) { copy($file,"a/"); }

Replies are listed 'Best First'.
Re: Re: Windows backslash problem
by martymart (Deacon) on Jan 23, 2003 at 18:32 UTC
    Hi Mr. Muskrat, I just tried your suggestion:
    use File::Copy; copy("a/b/*.txt","a/");
    unfortunately it doesn't seem to work for me. It works fine for an individual file, say:
    use File::Copy; copy("a/b/ccc.txt","a/");
    not a problem, but when the * is put in it doesn't seem to do its job. Any ideas?