user3185596
user3185596

Reputation: 79

Perl print issue for a bash/shell CGI script

I have a shell/bash CGI script which calls a perl script in the background and prints the output of the perl script to the bash html page.

Everything is working well, except that it's printing all of the output in a single line.

If I run the same script via command prompt with proper indent and "\n" everything is working.

I change the print to sprintf but with no help.

Any thoughts?

Upvotes: 1

Views: 85

Answers (1)

Roberto Reale
Roberto Reale

Reputation: 4317

If the output is to be included in a web page, you should include it in a <pre>/</pre> pair (preformatted text).

Or you should print out a <br> instead of \n.

Upvotes: 2

Related Questions