hi all, i want to open some files in a directory, you can see the details below,
#!/usr/bin/perl -w use strict; opendir (FH,'C:\Player'); chdir 'C:\Player'; for my $file(readdir FH) { open DH,"$file"; foreach my $line(<DH>) { while($line=~/"a=(\d),b=(\w+)"/gi) { $sum+=$2-$1; } } } print "$sum\n"; I can't open the files in 'C:\Player', can you help me find out where the problem is? thanks, Jack