in reply to Remove newline between strings

Your question doesn't give many details, but maybe you need something like the following?
#!/usr/bin/perl use warnings; use strict; while (<DATA>) { my $remove_new_line = /string1/ .. /string2/; chomp if $remove_new_line and 0 > index $remove_new_line, 'E'; # not the last line print; } __DATA__ x y z string1 a b c string2 1 2 3

Output:

x y z string1abcstring2 1 2 3
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Remove newline between strings
by Anonymous Monk on Jun 25, 2014 at 18:05 UTC
    Than you this helped a lot.