in reply to Re^3: update values in one file from anotherin thread update values in one file from another
local @ARGV = ('file1.txt'); local $^I = '.bak'; while (<>) { m/^(\w+)\s+(\d+)$/; printf "$1\t%d\n", exists $fed{$1} ? 0 : $2+1; } [download]