Think about Loose Coupling | |
PerlMonks |
Re: Extraneous behaviour of match variablesby ikegami (Patriarch) |
on Nov 03, 2006 at 03:49 UTC ( [id://582001]=note: print w/replies, xml ) | Need Help?? |
Are you talking about the blank output for "N"? "N" is reached on a successful match. It's printing blank because $1 was cleared because /video/ has no captures.
Update: Maybe the following will make things a little clearer:
When the match succeeds and the expression returns false, $1 is set.
Update: And finally, a solution to your problem
or
Replace the print with whatever you want.
In Section
Seekers of Perl Wisdom
|
|