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