#!/usr/pkg/bin/perl use CGI; $GFORTH = '/usr/pkg/bin/gforth'; $CORA = '/meta/p/papa/html/cgi-bin/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 S\" D:\" TYPE .S S\" F:\" TYPE F.S 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