Saved has asked for the wisdom of the Perl Monks concerning the following question:
I could brute force this, but thought there might be a more elegant way. I wish to add a prefix to a string if the string does not already start with the prefix. All help much appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Prepent string a to string b if b does not start with a
by choroba (Cardinal) on Mar 14, 2012 at 11:45 UTC | |
|
Re: Prepent string a to string b if b does not start with a
by Corion (Patriarch) on Mar 14, 2012 at 11:36 UTC | |
by Saved (Beadle) on Mar 14, 2012 at 11:46 UTC | |
by choroba (Cardinal) on Mar 14, 2012 at 11:48 UTC | |
by Saved (Beadle) on Mar 14, 2012 at 12:19 UTC | |
|
Re: Prepent string a to string b if b does not start with a
by Anonymous Monk on Mar 14, 2012 at 15:43 UTC |