Add /s to your substitution:
$s = "fred\nundone\nfred\nunknown\nfred\nuncaring\n";; $t = $s; $s =~ s[\nu][u]g; print $t;; fred undone fred unknown fred uncaring $t = $s; $s =~ s[\nu][u]sg; print $t;; fredundone fredunknown freduncaring
In reply to Re: Remove SOME new lines
by BrowserUk
in thread Remove SOME new lines
by RenMcCourtey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |