in reply to Can anyone make this shorter?

Untested, but i thikng ... perl -p -i.bak -e 's/(\d+)$/$1+1/e if (/^xyz\s*=/)'
Update : oops, misread question, changed (yet, still untested)
can't sleep clowns will eat me
-- MZSanford

Replies are listed 'Best First'.
Re: Re: Can anyone make this shorter?
by mlm (Novice) on Aug 21, 2001 at 20:14 UTC
    Interesting, but it will not change a specific variable in the file. -mlm