Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use File::DirCompare; use File::Basename; $x='directory1'; $y='directory2'; File::DirCompare->compare("$x","$y", sub { my ($a, $b) = @_; if (! $b) { printf "Only in %s: %s\n", dirname($a), basename($a); } elsif (! $a) { printf "Only in %s: %s\n", dirname($b), basename($b); } else { print "Files $a and $b differ\n"; } });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modify DirCompare.pm
by dragonchild (Archbishop) on May 23, 2008 at 13:29 UTC | |
by Anonymous Monk on May 23, 2008 at 13:52 UTC | |
by dragonchild (Archbishop) on May 23, 2008 at 14:34 UTC |