use strict; my (@dfary,@stats,$free,$stat); format LOG_TOP = REPORT OF FILESYSTEM USAGE on: @<<<<<<<<<<< my ($host) = qx(hostname) =~ /^([^.]+)/; page @<< $% MBblocks, Free, %Used, Mount, . format LOG = ^* $stat.+"," ~~ . my $DFOUT = new FileHandle "/usr/bin/df -m|" || die "df did not open $!"; my $percent = q|30|; while (<$DFOUT>) { next if $. == 1; next if /proc|net/i; for $stat ( (split(" ", $_, 0))[1,2,3,6]) { chomp $stat; ($free) = /(\d+)%/; if ( $free >= $percent ) { write (LOG); #last; #push (@stats, $stat); } else { next; } } } $DFOUT->close; # for (@stats) { # write (LOG); #}