Next | Program Repair Shop | 76 |
18 my ($pwd,$i)=($_[0],$i++);
Let's fix this:
my ($src,$dst) = @_;
Use $src and $dst instead of $source_directory and $target_directory
Now these hardwired variable names no longer make sense:
19 die "You have not defined the \$target_directory variable, sorry...\n" unless -e $target_directory; 20 die "You have not defined the \$source_directory variable, sorry...\n" unless -d $source_directory;
Let's go with
unless (@_ == 2) { die('Usage: xcopy($src, $dst)') }
That line 20 message was wrong anyway
Next | Copyright © 2002 M. J. Dominus |