my $meglimit=10; my $debug=1; my $daylimit='15'; my ($user, $name, $homedir, $total, $matched); open(IGUSERS, "$workdir/ignoreusers") || die "cannot open ignoreusers file: $!"; open(PASSWD, "passwd") || die "cannot open passwd file: $!"; while() { chomp; $matched=2; ($user, $name, $homedir)=(split /:/)[0,4,5]; print "$user-$name-$homedir\n"; foreach my $iguser () { print "running foreach\n"; chomp ($iguser); if ($iguser eq $user) { print "MATCHED-$iguser with $user\n"; $matched=1; last; } else { print "MATCH FAILED-$iguser with $user\n"; $matched=0; } } print "stuff\n"; if ($matched==0) { chdir "$homedir" || die "cannot chdir to $homedir: $!"; my $rawtotal=`du -smc * |grep total` || die "failed: $!"; print "DEBUG: Scanned - $user\n" if $debug==1; $rawtotal =~ m/([0-9]+)/; $total = $1; if ($total > $meglimit) { print "DEBUG: $user exceeded cap: $total\n" if $debug==1; #&checkdb(); #¬ify(); #&updatedb(); } } else { print "something\n"; } print "looping\n"; } close(PASSWD); close(IGUSERS); }