[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Sheflug] running shell commands asynchronously with perl



I've got some cgi perl that runs pppd. The problem is at the moment the
text from pppd appears in the browser all at once when the command has
finished, but I have seen a website running nmap through cgi which
updates as the command progresses. Is there some magik to this?

I have tried

	print `pppd call $connection 2>&1`;

and

	open(shell, "pppd call $connection 2>&1");
	@lines=<shell>
	close(shell);

then printing the contents of the array  [at] lines (which obviously won't
work until the command has returned).

--Andrew

-- 
sparc sun4c stuff:
	http://www.lostgeneration.freeserve.co.uk/sparc
PGP key for list [at] lostgeneration.freeserve.co.uk:
	http://www.lostgeneration.freeserve.co.uk/list.freeserve.co.uk.asc

Attachment: pgp00000.pgp
Description: PGP signature