in reply to Need a Method to add recursion to my regex

I think what you're looking for is:

$aligned[$posCount] = [ $sequence[1] =~ m/^(.*)$reg(.*)$/i ];

If you provided some sample input and expected output, then we could know for sure.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^2: Need a Method to add recursion to my regex
by vivomancer (Initiate) on Jun 19, 2012 at 16:39 UTC
    I think this is exactly what I needed. So far all testing that I've done has yielded the expected results. Thank you.