in reply to Perlish way of copying files

FYI, your first and last options won't work and it seems obvious to me that they aren't very "perlish". (:

You could make your first work several ways but I'll just show you this one: system('cp',<source/*>,'dest/.') and die For the last one you just need to change that last "*" to a ".".

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: Perlish way of copying files
by Sifmole (Chaplain) on May 03, 2001 at 19:06 UTC
    Why the angle brackets tye? Pardon my ignorance, please.
      Sifmole asked:
      Why the angle brackets tye?

      As you've probably noticed, I'm not tye. I hope you won't be so thoroughly dissappointed as to disregard my comments ;)

      tye wrote the following:

      system('cp',<source/*>,'dest/.') and die

      The angle brackets are what are known as a "filename globbing operator". Want all text files from the current directory?

      my @test_files = <*.txt>;

      However, if you want to use this with variables, it's better to use the glob operator:

      my @files = glob( $foo );

      Cheers,
      Ovid

      Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

        Thank you kindly. I think I now have something to go read up on.

        And no I was not too terribly disappointed.