emilford has asked for the wisdom of the Perl Monks concerning the following question:
Now I can say what I need to do in English, but after a long week, my brain won't give me the Perl code. I need to take $1 and use it in $dynamic_variables{$1} to replace the lefthand side of the s///.$line =~ s/\$\{\S+\}/\l$1/g; # not sure if escaping the {'s is neces +sary.
20040414 Edit by BazB: Changed title from 'swapping "dynamic" variables'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: replacing "dynamic" variables
by bbfu (Curate) on Apr 09, 2004 at 22:00 UTC | |
|
Re: replacing "dynamic" variables
by nothingmuch (Priest) on Apr 10, 2004 at 01:14 UTC | |
by Jenda (Abbot) on Apr 10, 2004 at 16:50 UTC |