in reply to Regular Expression
Never use $2 without checking the success of the prior match. If the match fails, you'll get a previous $2, which could even lead to security holes./^(\w+) (\w+)\;/; print $2;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|