in reply to Help on pattern match
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help on pattern match
by CountZero (Bishop) on Mar 18, 2009 at 13:26 UTC | |
|
Re^2: Help on pattern match
by Anonymous Monk on Mar 18, 2009 at 13:19 UTC |