alongwor has asked for the wisdom of the Perl Monks concerning the following question:
So if the line contains static replace [something] here then something is replaced. That works no problem. If I have static replace [something] and [another] thing then I get into problems. Can anyone help and point me in the right direction it would be greatly appreciated. Thanks in advance.if ($loop_line =~/\[(.*)\]/) { my $replace = $1; $loop_line =~s/$replace/$replace_with/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Replacing multiple matches
by edan (Curate) on Feb 16, 2004 at 11:36 UTC | |
|
Re: Replacing multiple matches
by Roger (Parson) on Feb 16, 2004 at 11:36 UTC | |
by alongwor (Novice) on Feb 16, 2004 at 11:49 UTC | |
|
Re: Replacing multiple matches
by Abigail-II (Bishop) on Feb 16, 2004 at 12:42 UTC | |
|
Re: Replacing multiple matches
by Koosemose (Pilgrim) on Feb 16, 2004 at 12:05 UTC | |
|
Re: Replacing multiple matches
by BUU (Prior) on Feb 16, 2004 at 22:03 UTC | |
|
Re: Replacing multiple matches
by Berik (Sexton) on Feb 16, 2004 at 11:27 UTC | |
by Abigail-II (Bishop) on Feb 16, 2004 at 12:08 UTC | |
by Berik (Sexton) on Feb 17, 2004 at 00:05 UTC | |
by Abigail-II (Bishop) on Feb 17, 2004 at 00:32 UTC |