in reply to Can anyone make this shorter?
perl -pi.bak -e 's/(xyz\s*=\s*)(\d*)/$1.($2+1)/e' test.data [download]