in reply to Re: In place search and replace with a hash
in thread In place search and replace with a hash
Thanks Rolf, I am not sure this is what you meant but I changed it to:
while (<FH>) { if (/(\S+):(\S+).*\n/) { $var1 = "$1"; $var2 = "$2"; s/$var1/$hash{$var1}_$var/g; } }
and now I get a different Use of uninitialized value error, which seems better?:
"Use of uninitialized value within %hash in concatenation (.) or string at test_perl.pl line 41"
I don't understand your comment about nested regexes, could you elaborate? Thanks in advance for any help
|
|---|