Output Display in a perl program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Output Display in a perl program
# 1  
Old 11-29-2011
Output Display in a perl program

Hi All,

I have created a sample perl program in one of the unix environment as below
HTML Code:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>";
When I execute it in unix, I get the below
Content-type: text/html
<H1>Hello World</H1>

However, when I execute it from a different server(Windows) using internet explorer
I get the additional line
#!/usr/bin/perl
being printed in it.


i.e.
I get the output
#!/usr/bin/perl
Content-type: text/html
<H1>Hello World</H1>

Note : Below is the command I used to run the perl program
http://userv1:6001/adminconsole/welcome.pl

Please help me on this.



# 2  
Old 11-29-2011
The first line points to the perl path.
Try changing it to correct windows path.

like

Code:
#!C:\perl\bin\perl.exe

Quote:
Originally Posted by mr_manii
#!/usr/bin/perl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl program get a response before the program quits

I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade. I have: if ( $response =~ m/^/ ) { $user_wants_to_quit... (1 Reply)
Discussion started by: germany1517
1 Replies

2. Shell Programming and Scripting

getting no output with my perl program

hi, i have posted the same kind of the question in some other forum of the same site. but realized that it is supposed to be here so i am reposting it .this is the perl script written to check for particular pattern. my file 1 would look like this hwk:678:9878:asd:09: abc cfgb 12 nmjk ......... (3 Replies)
Discussion started by: anurupa777
3 Replies

3. Programming

C program to display a busy symbol while processing

Hi I was wondering how can a c program will be implemented which will display a symbol while calculating something. for example : program should display some charters like /\/\ while calculating. At least provide some pointers thanks (4 Replies)
Discussion started by: rakeshkumar
4 Replies

4. Programming

To display unique lines in a Program

I am new to C programming. I have been trying to display unique lines in a file from past two days. The problem is here, I have a file whose contents are, ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net ras.beamtele.net... (1 Reply)
Discussion started by: Teju88
1 Replies

5. Homework & Coursework Questions

Calling compiled C program with Perl program

Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies

6. Shell Programming and Scripting

Display output bash program

Hello, i have a problem with the output from my bash program. I made this program #!/bin/bash BESTANDEN=$* # Plaatst bestanden in de variabele BESTANDEN TMPFILE=xmlprog.sh.$$.$RANDOM # basisnaam voor tijdelijke bestanden # controller of het programma correct is aangeroepen if then ... (6 Replies)
Discussion started by: dutchspiders
6 Replies

7. Shell Programming and Scripting

how to display the output file in an html format using perl

Hi, I have written a perl script to dispaly some statements from a file but i want the output statements to be dispalyed in an HTML format.Is it possible for me to do in perl scripting? Please help me with ur thoughts. Thanks In Advance Meva. (1 Reply)
Discussion started by: meva
1 Replies

8. Shell Programming and Scripting

Net::SSH::Perl->Execute any unix command & display the output in a proper form

Net::SSH::Perl ...... how to print the output in a proper format my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies

9. Programming

program or script to display user info

I'm on a Linux machine and need a program that will display user information as follows: user name, user directory and current date & time. I think we can compile C, C++ and Perl. All help is appreciated. (4 Replies)
Discussion started by: flasun
4 Replies

10. Shell Programming and Scripting

Display a Graphic from a Unix program on a Pc – how?

An interesting puzzle. I run character based compiled C-Programs in a Unix environment on PCs in a Window. I want to be able to call up and display in a separate window a picture of a product called by a Unix shell script from within my Unix program. Ideally I would like to have a script that... (4 Replies)
Discussion started by: Barry Staples
4 Replies
Login or Register to Ask a Question