in reply to Reading Text from file and reorganization

Here's one way to do it, by simply chomping the line ending from every other line:
#!perl -i.bak $toggle = 0; while (<>) { chomp if $toggle ^= 1; print; } print "\n" if $toggle; # if the last line was chomped
If you wanted, you could use the -p option to make the reading and printing parts automatic:
#!perl -pi.bak BEGIN { $toggle = 0; } chomp if $toggle ^= 1; END { print "\n" if $toggle; }