http://qs321.pair.com?node_id=1227266


in reply to Print text on the same line after match

You can use capturing parentheses and print the captured number ($1) instead of the entire line:
perl -ne 'print $1 if /INC\*XX\*(\d+)/' cr835.txt 123456