You've posted no code, why make people guess what $htmldata is? You don't show us how you read this input, what processing is done on the input or how you display your output. If all you do is read the data into a variable and print it within a webpage it isn't going to display in the same manner it did within your text editor. You need to learn about HTML, and basic perl. Rather than have to reiterate your problem consider putting some thought into your posts, and asking a real question, How do I post a question effectively?.