Then don't interpolate it beforehand.  (Didn't you get a warning
about "use of uninitialized value"?)
I can't use strict because I simple add a config-file via require and the variables are simply declared (without my or our). And as it gives me a lot of warnings, I disabled them, too :-)
But I can't change the way it is, I just have to extend it.


my $reg_exp = qr/^ONE\.(\d{6})\.THREE$/;
my $replace_with = 'FOUR.$1.FIVE';

my $example_file = "ONE.123456.THREE";
$example_file = s/$reg_exp/qq{"$replace_with"}/ee;
Thanks a lot, that worked!! I just didn't know how to interpolate $replace_with at a given time.
Again, thanks, you have saved my day :-)


Greets,
        Markus

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to