Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to say something like $NewVariable eq whatever $ExistingVariable would be if I applied s/^Super// to it? Does that make sense? Does this have to take up three lines or can I do it in one?$ExistingVariable = "SuperMan"; $NewVariable = $ExistingVariable; $NewVariable=~s/^Super//;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Substitution question
by broquaint (Abbot) on Apr 14, 2003 at 15:05 UTC | |
|
Re: Substitution question
by Abigail-II (Bishop) on Apr 14, 2003 at 15:08 UTC | |
|
Re: Substitution question
by Anonymous Monk on Apr 14, 2003 at 15:11 UTC | |
by broquaint (Abbot) on Apr 14, 2003 at 15:21 UTC |