|Just another Perl shrine|
Re^3: regex troubleby amir_e_a (Hermit)
|on Mar 05, 2010 at 07:11 UTC||Need Help??|
Matching by itself only checks whether a string conforms to a pattern that you defined in the regular expression.
You capture strings using brackets - ( ).
If you have only one string to capture, then the way that almut suggested will work.
If you have more than one string, you have several ways to capture them:
Third way - very readable, but will only work in Perl 5.10:
(You should probably pick better names that "part1" and "part2". I only gave them as an example.)