#seems like the string "branch from" is not matching since $1 below prints nothing
$1 refers to text matched by the first set of capturing parens (if any). Since your regex:
if ($line =~ /branch from/)
doesn't contain any capturing parens, $1 will never be set.
In reply to Re: Match problem
by BrowserUk
in thread Regex problem
by perl_mystery
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |