#!/usr/bin/perl
# use it with  
#   find /users/vmail/domain/user -name *S=* -type f 
# as input
use strict;
my $line;

while ($line = <STDIN>){
    
   if ($line =~ /S=(\d{1,})/){
      open(MYHD,"< $line") or die("can't open <$line>");
      my @mystat=lstat MYHD;

      chomp($line);
      print "\n[$line] real size:[".$mystat[7]."] named size:[$1] ";

      if ($mystat[7] eq $1){
        print "OK";
      }else{
        print "PROBLEM";
      }
      close(MYHD);
   }
    
}

