I have a perl script that prints up the html code and executes a few korn scripts to populate the web code.
Disclaimer === I can throw together some korn scripts pretty quick. This code changes pretty frequently. I don't know enough about perl to do everything I need. One day maybe I'll get there but for now -- This does work at least on the web side.
Basically I call a korn script in a variable with tics and print the var inside the html code....
See Below:
Keep in mind this does work and gives me my expected results. Pretty ? Prob not.
After churning the ksh script, it simply echos y or n
I would like to also echo some output to a file. The script does exactly that and works as designed when I execute either the ksh script by itself or from executing perl script from the command line.
My Problem.....
However when I call the perl script form the browser it will not output the additional info from the ksh script to the text file....
In the example below, it is line 32 the is not being executed when running the perl script from the browser.
Again all the will work if I run the perl script form the command line.
Permissions related? Are you sure it is being run by a user that has access to append output to that file? Try changing it to print $MESSAGE >> /tmp/somenewfile to test...
Perl buffers output by default. Maybe when you execute from browser you never see the buffered output. Set $| = 1; (or $AUTOFLUSH = 1) and you will turn off buffering on the CURRENTLY SELECTED FILE HANDLE which I'm guessing is STDOUT anyway when you get to that print statement in the perl script...
I'm writing a perl script that writes an html file.
use Tie::File;
my ($dir) = @ARGV;
open (HTML,">","$dir/file.html") || die $!;
#-----Building HTML file---------------------------
print HTML "<!DOCTYPE html>
<html>
<head>
<title>Output</title>
<link... (3 Replies)
I am currently in Afghanistan and do not have access to some of the resources I normally do back in the US. Just accessed this site and it looks promising! Hopefully you will not find my question too much of a waste of your time.
I write mostly Korn Shell and PERL on Solaris systems for the... (2 Replies)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
My webpage is hosted from perlscript(homepage.pl), i want to add piece of html code in the footer of the homepage. I simply pasted the html code at the end of the perl script as below...
========================================================
close(OUTSQL);
... (4 Replies)
Hello all
I have a string like
" Have Fun for the rest of the day !. I will meet you tomorrow!"
! is the HTML Equivalent of ! symbol.
From the above string, i would like to remove only the HTML encoded special characters.
Output should be like
" Have Fun for the rest of the day... (4 Replies)
Hi All,
I have a requirement of converting an html form into pdf using perl.
The html form contains images, tables and css implementation. I tried using various perl modules but failed to achive the target.
I succeeded in generating a pdf from the html file using... (2 Replies)
I have this script that I want to be able to scan a list of IP address from a file (namlist and snifflist)and Hostnames of network devices to see if they are alive or down and if telnet port 23 is open. I originally started to write this in Korn Shell and ran into some issue trying to closed a... (0 Replies)
i have a HTML report file..its in attachment(a part of the whole report is attached..name "input html.doc").also its source is attached in "report source code.txt"
i just want to seperate the datas like in first line it should be..
NHTEST-3848498958-NHTEST-10.2-no-baloo a
and so on for whole... (3 Replies)
hi. im very new to perl. is it possible to fill up a web form and submit it using perl? example, i would like to sign up for a yahoo account though a perl script (ofcourse, granting the "type the characters as shown in imgage" is absent)? (8 Replies)