Help for this page

Select Code to Download


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