Mr. Newb has asked for the wisdom of the Perl Monks concerning the following question:
And of course, %translate is already declared and filled. However, I get the error: Global symbol "$translate" requires explicit package name. Help?foreach my $thing (keys(%translate)) { s/${thing}/${translate}{${thing}}/g; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: change all occurances of string1 into string2
by toolic (Bishop) on Nov 29, 2012 at 15:22 UTC | |
by Mr. Newb (Acolyte) on Nov 29, 2012 at 15:42 UTC | |
by Mr. Newb (Acolyte) on Nov 29, 2012 at 15:43 UTC | |
|
Re: change all occurances of string1 into string2
by choroba (Cardinal) on Nov 29, 2012 at 15:29 UTC | |
by tobyink (Canon) on Nov 29, 2012 at 16:10 UTC | |
|
Re: change all occurances of string1 into string2
by roboticus (Chancellor) on Nov 29, 2012 at 18:16 UTC | |
|
Re: change all occurances of string1 into string2
by zwon (Abbot) on Nov 29, 2012 at 15:37 UTC |