I can't use split because the junk data in between my valid matches isn't consistant. I know I will always have exactly three matches. I thought that the backreferences were returned in a list, but I can't remember what that is. Thanks! f.foreach (@biglonglist) { if (/(thing1)misc stuff(thing2)random garbage(thing3)/) { $x->{a} = $1; $x->{b} = $2; $x->{c} = $3; } }
In reply to pattern matching and return values by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |