$! Integrate the Perl script directly into a DCL procedure (mostly harmless!) $! 02-NOV-97 MGD now only demonstrates one way to wrap a Perl script into $! a DCL procedure (superceded by CGIplus.pl at HTTPd v4.5) $ define /user InlineScript sys$input $ perl InlineScript $ deck # ----- start of Perl script ----- # 08-JUN-97 MGD initial # BTW: Seems a shame to broadcast how little I know about Perl :^) $CgiPlusEof = $ENV{"CGIPLUSEOF"}; $CgiPlusEof ne "" || die "Only executes in CGIplus environment!\n"; $FirstUsed = localtime(time()); $UsageCount = 1; open (CGIPLUSIN, $ENV{"CGIPLUSIN"}) || die "Could not open CGIPLUSIN\n"; for (;;) { ; # discard start-of-request record $Now = localtime(time()); printf ("Content-Type: text/plain\n\n"); printf ("Number of times used: %d\nFirst used: %s\nNow: %s\n\n", $UsageCount++, $FirstUsed, $Now); while () { chop; if ($_ eq "") { last; } printf ("%s\n", $_); } printf ("%s\n", $CgiPlusEof); } # ----- end of Perl script ----- $ eod $ stop/id=0