JojoLinkyBob has asked for the wisdom of the Perl Monks concerning the following question:
Output:$attempt1 = "get_stuff()"; $attempt2 = "get_stuff\(\)"; $attempt3 = qq(get_stuff()); $newstr = "apple"; $data = $attempt1; $data =~ s/$attempt1/$newstr/; print "\n$data"; $data = $attempt2; $data =~ s/$attempt2/$newstr/; print "\n$data"; $data = $attempt3; $data =~ s/$attempt3/$newstr/; print "\n$data";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Quickie Question: search and replace problem
by indigo (Scribe) on Apr 19, 2001 at 00:19 UTC | |
by tye (Sage) on Apr 19, 2001 at 00:58 UTC | |
by indigo (Scribe) on Apr 19, 2001 at 01:13 UTC | |
by JojoLinkyBob (Scribe) on Apr 19, 2001 at 00:55 UTC |