#!/usr/pkg/bin/perl use CGI; $GFORTH = '/arpa/ns/p/papa/bin/gforth-0.7.0'; $CORA = '/arpa/ns/p/papa/share/gforth/site-forth/cora.fs'; $query = CGI->new; $command = $query->param('command'); print < Gforth Calculator

Gforth Calculator

Command

END1 if ($command) { open(RESULT, '-|', "$GFORTH $CORA -e '$command CR BYE'") or die "Can't start gforth: $!"; print "
$command==>"; while () { chop $_; print "$_
"; } print "
\n"; } print <Gforth Manual
Starting Forth
Thinking Forth
Forth Research
Forth Interest Group
Chuck Moore
END3