Jenda Krynicky wrote:

> Are the $n variables accessible as an array as well?
> 
> Currently I am using
> 
> no strict 'refs';
> ...
> ... ${$i} ...
> 
> but I don't really like that.
> 
> I know I can do
> 
> @array = ($string =~ /regexp/);
> 
> but I need to access the matched strings in the code in
> s/regexp/code/ge so this is not workable.
> 
> So did I overpass anything?
> 

maybe i miss you point and your question. s/regexp/code/ge, the code portion 
is not matched/search for Perl, it's purely a replacement string(or 
expression with as many /eeee as you want). the word 'capture' doesn't make 
much sense here. for example:

my $i = 'abcd 1234';
my $j = 'hi;

$i =~ s/abcd/($hi)/;

the '()' in replacement is not capturing anything, it's taken as it's. $i 
now become:

(hi) 1234

as i said, maybe i have miss your point, but i don't see how you can capture 
anything.

david

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to