rsriram has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I am sorry if I am hosting a basic question! But I am new to CGI Perl.
I want to open a XML file and display its contents in the web. The script I wrote is
#!C:\perl\bin\perl.exe -wT use strict; use CGI qw/:standard/; print header, open (FILE, "c:/perl/directory.xml"); while (<FILE>){ chomp; print "$_\n"; }
But in the internet explorer, I see all the lines in the file running on continiously, i.e., \n doesn't seem to work. Can anyone help me out?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Displaying carriage returns
by imp (Priest) on Aug 11, 2006 at 13:14 UTC | |
|
Re: Displaying carriage returns
by davorg (Chancellor) on Aug 11, 2006 at 13:42 UTC | |
|
Re: Displaying carriage returns
by liverpole (Monsignor) on Aug 11, 2006 at 13:13 UTC | |
|
Re: Displaying carriage returns
by marto (Cardinal) on Aug 11, 2006 at 13:14 UTC | |
|
Re: Displaying carriage returns
by monkey_boy (Priest) on Aug 11, 2006 at 13:01 UTC | |
by marto (Cardinal) on Aug 11, 2006 at 13:17 UTC | |
|
Re: Displaying carriage returns
by duckyd (Hermit) on Aug 11, 2006 at 18:25 UTC | |
|
Re: Displaying carriage returns
by bart (Canon) on Aug 12, 2006 at 09:13 UTC | |
|
Re: Displaying carriage returns
by msalerno (Beadle) on Aug 11, 2006 at 17:54 UTC |