# try splitting on ^M (windoze newlines) my @contentarray = split /\r?\n/, $content_to_parse;