Here's a string in my file, #define MY2D_STRING "4.0.1.999.9"
of which I'm trying to increment the last digit; let's say with 1, such that the output is 4.0.1.999.10 I've tried _various_ combinations, here's just one of them. (This works partially, but not always). perl -i -pe 'if (/(MY2D_STRING\b.*)(.\d+)"/){$a=$2;s/$a/$a+1/ge}' $filename ------------ Also, another one (though I can figure this out with help with just the first one) MY3D_STRING(test, 4.0.1.999.9) TIA. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/