sub compare_paths{ my @path1 = split /\//, +shift; split /\//, +shift; grep { defined $_} map {my $n = +shift; $_ ne $n ? ($_,$n) : undef} @path1; }