From: Ben Crane <[EMAIL PROTECTED]>
> Anyone know how to do a wildcard file::copy? E.g. I
> want to copy a file with a certain name but different
> extensions.
> 
> I have tried concatenating ".*" to the end of a
> filename (without an extension obviously) but it
> fails.
> This is what I had in mind...it's just a scribble and
> not exactly the way the code will go.
> 
> $string2 = "$string[1]".".*";
> copy("$string2","$destination") || warn "could not
> copy files: $!";

If you happen to need it just for Windows:

        use Win32::FileOp qw(Copy);

        Copy "file.*", $destination;

you can even get confirmation and progress dialogs from the module if 
you like ;-)

You can install it with PPM from http://Jenda.Krynicky.cz/perl

Jenda

===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to