|XP is just a number|
Re: Bug in script, regex help req extreme urgentby pvaldes (Chaplain)
|on Mar 09, 2013 at 13:14 UTC||Need Help??|
I need to debug this script. This is an urgent requirement
Type: use strict; very fast
Ok, we got one!
Can't see the strings "newname" or "oldname" in your script. Can we have an example of the matching line?
(...few minutes later...)
Ok, i see... Try to be as clear as you can.
oldname = 2, newname = 1... you want to change 2 by 1. Could I suggest to replace 1 by 2 instead and avoid unnecessary obfuscation?my $string =~ s/^module.*?$oldname.*?([\\(;])/module $newname$1/sg;
Mmmh, I'm not very comfortable with the idea of to use ";" or "(" as last character of a filename...