in reply to Re: Re: Test to see if directories are the same
in thread Test to see if directories are the same

merlyn: Don't write the same code twice. Ever. :)
oops. sorry :))

this gave me an idea: why not give ppl a way to compare N directories? :) here is the test code:

#!/usr/bin/perl -w use strict; use Cwd 'abs_path'; defined @ARGV and print sameDirectory(@ARGV),$/; sub sameDirectory { (-d) ? $_ = abs_path $_ : return -1 for @_; $_[0] ne $_ and return 0 for @_; 1; }

--
AltBlue.