in reply to Replacing everything in between using s///;
And since you aren't actually using the part in the middle, you don't need the parentheses, though the code works fine with or without them:$string =~ s/$first(.*?)$last/$reserve/s;
$string =~ s/$first.*?$last/$reserve/s;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Replacing everything in between using s///;
by tlm (Prior) on May 09, 2005 at 04:58 UTC |