You will probably need to post a clearer explanation. It sounds like you are after the @ary = $str =~ m/(stuff)/g idiom like in the do block. This looks for all (/g) the matches (m//) on 'stuff' (m/stuff/) in $str, captures them in $1 sequentially (m/(stuff)/) and saves them into @ary. Something like this will probably do what you want.
There was not an 'Idioms Explained' on this common one so I wrote it Perl Idioms Explained - @ary = $str =~ m/(stuff)/g
$str = 'SELECT ..... where a.owner = b.owner && c.index_owner=d.owner. +...'; $str =~ m/\.(owner|index_owner)\s*=/ && do{ @alias = $str =~ m/(\w+)\. +\w/g }; print "@alias";
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Multple Matches using Regexp?
by tachyon
in thread Multple Matches using Regexp?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |