for my $line (split /\r\n?|\n/, $file_content) { print $line . "\n"; }