in reply to Re^2: update values in one file from another
in thread update values in one file from another
This only works the first time it's run, after that everything that isn't in $fed{1} is always only set to 1.local @ARGV = ('file1.txt'); local $^I = '.bak'; while (<>) { m/^(\w+)\s+(\d+)$/; printf "$1\t%d\n", not exists $fed{$1} ? $2+1 : 0; }
|
|---|