Sponsored Content
Full Discussion: Perl + Korn + HTML
Top Forums Shell Programming and Scripting Perl + Korn + HTML Post 302222893 by quine on Thursday 7th of August 2008 09:51:03 PM
Old 08-07-2008
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...

Anyway, no harm trying it...
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl and html

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)
Discussion started by: marcpascual
8 Replies

2. Shell Programming and Scripting

HTML parsing by PERL

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)
Discussion started by: avik1983
3 Replies

3. Shell Programming and Scripting

Korn Shell and Perl Administrative Script

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)
Discussion started by: metallica1973
0 Replies

4. Shell Programming and Scripting

Converting html to pdf perl

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)
Discussion started by: DILEEP410
2 Replies

5. Shell Programming and Scripting

HTML Encoded characters -- Perl

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)
Discussion started by: vasuarjula
4 Replies

6. Shell Programming and Scripting

Embedding HTML in Perl script

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)
Discussion started by: paventhan
4 Replies

7. Shell Programming and Scripting

HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

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)
Discussion started by: newbie_01
3 Replies

8. UNIX for Advanced & Expert Users

Calling PERL from a Korn shell script

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)
Discussion started by: mseanowen
2 Replies

9. UNIX for Dummies Questions & Answers

Writing an HTML file in perl

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)
Discussion started by: jrymer
3 Replies
SETBUF(3S)																SETBUF(3S)

NAME
setbuf, setbuffer, setlinebuf - assign buffering to a stream SYNOPSIS
#include <stdio.h> setbuf(stream, buf) FILE *stream; char *buf; setbuffer(stream, buf, size) FILE *stream; char *buf; int size; setlinebuf(stream) FILE *stream; DESCRIPTION
The three types of buffering available are unbuffered, block buffered, and line buffered. When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered many characters are saved up and written as a block; when it is line buffered characters are saved up until a newline is encountered or input is read from stdin. Fflush (see fclose(3S)) may be used to force the block out early. Normally all files are block buffered. A buffer is obtained from malloc(3) upon the first getc or putc(3S) on the file. If the standard stream stdout refers to a terminal it is line buffered. The standard stream stderr is always unbuffered. Setbuf is used after a stream has been opened but before it is read or written. The character array buf is used instead of an automati- cally allocated buffer. If buf is the constant pointer NULL, input/output will be completely unbuffered. A manifest constant BUFSIZ tells how big an array is needed: char buf[BUFSIZ]; Setbuffer, an alternate form of setbuf, is used after a stream has been opened but before it is read or written. The character array buf whose size is determined by the size argument is used instead of an automatically allocated buffer. If buf is the constant pointer NULL, input/output will be completely unbuffered. Setlinebuf is used to change stdout or stderr from block buffered or unbuffered to line buffered. Unlike setbuf and setbuffer it can be used at any time that the file descriptor is active. A file can be changed from unbuffered or line buffered to block buffered by using freopen (see fopen(3S)). A file can be changed from block buffered or line buffered to unbuffered by using freopen followed by setbuf with a buffer argument of NULL. SEE ALSO
fopen(3S), getc(3S), putc(3S), malloc(3), fclose(3S), puts(3S), printf(3S), fread(3S) BUGS
The standard error stream should be line buffered by default. The setbuffer and setlinebuf functions are not portable to non-4.2BSD versions of UNIX. On 4.2BSD and 4.3BSD systems, setbuf always uses a suboptimal buffer size and should be avoided. Setbuffer is not usually needed as the default file I/O buffer sizes are optimal. 4th Berkeley Distribution May 12, 1986 SETBUF(3S)
All times are GMT -4. The time now is 03:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy