in reply to join two lines in a file?

do you really want to do this in perl?...because you could:
a) get the file from origin again, making sure line break is not introduced with a different choice of tranmission/text-editor/etc used to get the file
b) use simple regex or two in vi/vim/your_favorite_regex_editor. regex is something like use Join command on all lines that start with a space
the hardest line to type correctly is: stty erase ^H