in reply to Finding the right $<*digit*> capture variable
sub last_match { # Accepts no args # Returns the digit of the last parenthesis match or undef if ther +e isn't one my $match_num = 1; if(defined($$match_num)) { while(defined($$match_num)) { $match_num++; } $match_num--; } else { undef $match_num; } return $match_num; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Finding the right $<*digit*> capture variable
by hv (Prior) on Apr 17, 2003 at 13:26 UTC | |
by diotalevi (Canon) on Apr 17, 2003 at 13:48 UTC | |
by hv (Prior) on Apr 17, 2003 at 14:29 UTC |