You don't change $inc, so no surprise it contains the whole line.
if (my ($file) = $inc =~ /(FILE_INPUT_\w+)/) { print("$file\n"); }
Update: Replaced print("$inc\n"); as per reply.
In reply to Re: Help on pattern match
by ikegami
in thread Help on pattern match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |