So I'm trying to read in a config. file in Perl. The config file uses a trailing backslash to indicate a line continuation. For instance, the file might look like this:
=== somefile ===
foo=bar
x=this\
is\
a\
multiline statement.
I have code that reads in the file, and then processes the trailing backslash(es) to concatenate the lines. However, it looks like Perl already did it for me. For instance, the code:
open(fh, 'somefile');
@data = <fh>;
print join('', @data);
prints:
foo=bar
x=thisisamultiline statement
Lo and behold, the '@data = ;' statement appears to have already handled the trailing backslash!
Is this defined behavior in Perl?
--Steve