in reply to Regex problem
#seems like the string "branch from" is not matching since $1 below prints nothingThe string "branch from" is matching, and you can prove it by using some visible delimiters (Tip #3 from Basic debugging checklist) as follows:
print ">>>$1<<<\n";#doesnt print anything
However, $1 is undefined because you need to use capturing parentheses in your regex. You really should use strict and warnings and perltidy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Match problem
by perl_mystery (Beadle) on Dec 22, 2010 at 01:18 UTC | |
by perl_mystery (Beadle) on Dec 22, 2010 at 01:42 UTC | |
by oko1 (Deacon) on Dec 22, 2010 at 02:49 UTC |