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
In Section
Seekers of Perl Wisdom