sub same_file_p { my @stat1 = stat shift; my @stat2 = stat shift; return "@stat1[0,1]" eq "@stat2[0,1]"; } #### sub all_same_file { # true if all arguments represent the same file my %counts; $counts{join " ", (stat)[0,1]}++ for @_; 1 == keys %counts; }