in reply to no reaction on string replace
You should use warnings; Because the default for filehandle is *input*. So when you write open(FILE, "$S") you open the file for reading. You should have been warned about that.
@lines = <FILE> makes a copy of the file content, but for(@lines) doesn't make any copy, inside the for loop $_ is not a copy of a line, it's the line itself. So in the end @lines and @newlines are certainly the same.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: no reaction on string replace
by semipro (Novice) on Sep 10, 2013 at 21:31 UTC | |
by Eily (Monsignor) on Sep 10, 2013 at 21:42 UTC | |
by semipro (Novice) on Sep 11, 2013 at 19:27 UTC | |
by poj (Abbot) on Sep 11, 2013 at 20:14 UTC | |
by Eily (Monsignor) on Sep 11, 2013 at 21:33 UTC |