JojoLinkyBob has asked for the wisdom of the Perl Monks concerning the following question:
This works:
But this doesn't:my %fruitcolors = ( banana=>"yellow" ); $_ = "applebananachocolate"; s/apple(banana)chocolate/$fruitcolors{$1}/ie;
Is there a special delimiter I need?s/(apple)(banana)(chocolate)/$1$fruitcolors{$2}$3/ie;
Thanks in advance
=~Desertcoder
Edit Masem 2002-01-21 - Changed title from "Expressionless :"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Expressionless :
by japhy (Canon) on Jan 20, 2002 at 23:48 UTC | |
|
Re: Expressionless :
by belg4mit (Prior) on Jan 20, 2002 at 23:24 UTC | |
by JojoLinkyBob (Scribe) on Jan 20, 2002 at 23:46 UTC | |
|
Re: Expressionless :
by blakem (Monsignor) on Jan 20, 2002 at 23:39 UTC | |
|
Re: Expressionless :
by dws (Chancellor) on Jan 20, 2002 at 23:30 UTC |