in reply to Re: (tye)Re: Perlish way of copying files
in thread Perlish way of copying files

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.

Replies are listed 'Best First'.
Re: (Ovid - angle brackets) Re(3): Perlish way of copying files
by Sifmole (Chaplain) on May 03, 2001 at 21:02 UTC
    Thank you kindly. I think I now have something to go read up on.

    And no I was not too terribly disappointed.