mvaline has asked for the wisdom of the Perl Monks concerning the following question:
Although I'm sure it's been done before, I wrote a script to convert newline characters from UNIX to DOS format. There are obviously times when being able to pass a wildcard (like *.txt) to the script would be useful. The begining of my script is as follows.
foreach my $file (@ARGV) { print("converting $file..."); open(FILE, "<$file"); my @lines = <FILE>; close(FILE);
When I run the script with the argument *.txt, it prints converting *.txt... and doesn't do anything with the files in the directory. However, when I run the same script under UNIX, it processes each file in the directory that matches the mask. What do I have to do to get that same result under Windows?
|
|---|