in reply to Interpolating backreferences in an eval
Try:
...eval comes in two flavours: (a) eval BLOCK -- in which the BLOCK is compiled in the usual way, and the eval is a way of trapping die; (b) eval EXPR in which the result of the EXPR is parsed and executed at run time. See expr.print eval qq{"$to"}, "\n";
Of course, you could also:
my $q = $1 ; $to =~ s/\$1/$q/g ;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Interpolating backreferences in an eval
by gnustavo (Novice) on Feb 11, 2009 at 19:05 UTC |