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 :-)Then don't interpolate it beforehand. (Didn't you get a warning about "use of uninitialized value"?)
But I can't change the way it is, I just have to extend it.
Thanks a lot, that worked!! I just didn't know how to interpolate $replace_with at a given time.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;
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>