while($string=~/regexp/g) { push @arr , $1 }

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?
> 
> Thanks, Jenda
> 
> =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
> There is a reason for living. There must be. I've seen it somewhere.
> It's just that in the mess on my table ... and in my brain
> I can't find it.
>                                       --- me
> 



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

Reply via email to