| Next | Program
Repair Shop ![]() |
40 |
Here's the end result:
sub CopyFiles {
my $src = shift;
my $dst = shift;
foreach $file (@_) {
next if $file !~ /\d/;
next if $file !~ /\.txt$/;
my $command = "cp $src/$file $dst/$file";
system($command);
print "$command\n";
}
}
Isn't that tidy?
Down to 9 lines from 19
Also we fixed some bugs
| Next | ![]() |
Copyright © 2002 M. J. Dominus |