Got that, thanks Shlomi! However, can this be done by referencing $1 directly with strict refs on? I definitely feel it can be done and would be nice to know how!
Regards, Akhthar Parvez K http://Tips.SysAdminGUIDE.COM UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity - Dennie Richie On Tuesday 13 Apr 2010, Shlomi Fish wrote: > There are several ways to overcome this problem. I suggest that instead of > referencing $1, $2 and $3 directly you place them in an array: > > {{{ > my @matches = ($string =~ m{....}ms); > }}} > > And then access the captures in @matches using their indices - > $matches[$idx-1]. Just note that $matches[0] would be $1, $matches[1] would > be > $2. If that doesn't work for you due to some reason, I may be able to come up > with other suggestions. > > Regards, > > Shlomi Fish -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/