for (;;) { @x = `df /common`; @y = ($x[2]=~ /(\d+)/g); $avail = $y[2]; if ($last) { my $delta = $avail - $last; print "$delta"; } print $x[2]; $last = $avail; sleep 5; }