[EMAIL PROTECTED] (David S. Rosinger) writes:
> In addition to the other suggestions, how about this one?
>
> #!/usr/bin/perl -w
>
> use strict;
> use File::DosGlob 'glob';
> use File::Copy;
>
> foreach my $file (<C:/test1/*.*>) {
> next if (-d $file);
> copy ($file, "C:/test2") or die "Can't copy \`$file': $!\n";
> }
>
> __END__
Following up to my own post. I just happened to come
across this yesterday:
What's New in Perl 5.6.0?
http://www.perl.com/pub/2000/04/whatsnew.html
| File Globbing
|
| The glob operator (<*> and glob) used to be processed by
| spawning a shell; that was problematic for operating systems
| that didn't have a standard shell, and anyway had the overhead
| of creating a new process. It's now implemented by calling the
| standard File::Glob module on demand.
So those of you running build 613 now have a cross-platform method of
globbing.
--David
---
You are currently subscribed to perl-win32-users as: [[email protected]]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]