in reply to accessing backreferences
The problem I take it you're running into is that
Produces a warning under use strict (specifically, under use strict 'refs'). You CAN turn off strict refs in a block withprint ${$_},"\n";
But you're probably better off loading your captured backreferences into an array, and then looping through the array , e.g.:{ no strict 'refs'; # stuff }
my @bits = /(f.o)(b.r)(b.z)/; foreach (@bits) { print "$_\n"; }
HTH.
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: accessing backreferences
by YaRness (Initiate) on Mar 15, 2001 at 01:36 UTC |