in reply to Re: Reading "slices" out of a file at known start markers
in thread Reading "slices" out of a file at known start markers

We can avoid pushing into an array @file if the goal is just to print it out:
while(<DATA>) { chomp; # find out if there's a line continuation # and remove the trailing backslash my $cont = s/\\\s*$//; # print without newline, no matter what print; # decide whether to end print with newline print "\n" unless $cont; }

Update: Actually, a simple substitution would suffice:
while (<DATA>) { s/\\\s*\n//; print; }