![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SCCS - A slight scripting issue | tangent | UNIX for Dummies Questions & Answers | 0 | 06-16-2008 08:50 AM |
| Perl scripting | rsendhilmani | Shell Programming and Scripting | 3 | 07-05-2007 03:51 AM |
| Perl scripting | rochitsharma | UNIX for Advanced & Expert Users | 2 | 08-24-2006 08:55 AM |
| Awk scripting issue | hcclnoodles | Shell Programming and Scripting | 3 | 01-18-2005 09:23 AM |
| scripting issue | moe2266 | Shell Programming and Scripting | 2 | 01-05-2005 10:32 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need Help with Perl Scripting Issue.
The Perl script runs fine without any error from command line. The script executes an external command and prints the output on a web page. But somehow when I call it from URL it does not work. Any help will be appreciated. Here is the script:
--test.pl #!/usr/bin/perl # use warnings; use strict; use Socket; print "Content-type: text/html\n\n"; print <<ENDOFHTML; <HTML> <HEAD> <TITLE>Test Page</B></CENTER></TITLE> <BODY background="/icons/page-background.png"> <body text="#808080"> <IMG SRC="/icons/test.gif" width="142" height="60" align="left"> <h1 align="center" font size=1> Netops-DashBoard</center></h1> <br> <br> ENDOFHTML open(SMP, "/usr/local/bin/sshpass -p test ssh test.com /usr/contrib/bin/serverinfor -b |") || die "Failed: $!\n"; while ( <SMP> ) { chomp; my $line = $_; print "$_ \n"; print "<br>\n"; } # while print "</BODY>"; print "</HEAD>"; print "</HTML>"; -----The script does not work when we call from : http://www.xxx.xxx/test.pl In the sense that the While Loop does not get executed..... |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|