local @ARGV = ("diskmon"); local $^I = '.bak'; while (<>) { m/^(\w+)\s+(\d+)$/; printf "$1 %d %s\n", exists $disk{$1} ? 0 : $2+$partition; }