in reply to Backref in a regex quantifier
I don't think you will be able to do this in one step, you will probably have to do something like this:
if ( /^(\d+?)/ ) { my $len = $1; if ( /^$len(.{$len})/ ) { my $value = $1; # do something with $len and $value } }
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Backref in a regex quantifier
by webfiend (Vicar) on Jul 09, 2007 at 18:10 UTC |