Piping a Javascript prompt to a scalar

Fred Steinberg fred at alaska.net
Fri Apr 2 17:34:30 CST 1999


>>>>> "Kevin" == Kevin Creason <kevinc at gci.net> writes:

 Kevin> I'm trying to pipe a javascript prompt into a scalar.
    ...
 Kevin> I tried $scalar=(print all that stuff); and $scalar=<STDIN>; and
 Kevin> $scalar=$ARGV[0];

It doesn't work that way a'tall; by the time the Javascript is executing
(in the browser), your perl script (running on the server) has exited.

  Kevin> Is there are better way to get a username before a CGI proceeds?

You might want to look into using server authentication; the user must
identify themselves before your CGI is ever run. Then, in your script, you
can simply do:
   $username = $ENV{REMOTE_USER};

This is a useful link about Web-based login:
    http://www.webthing.com/tutorials/login.html

(not really anything to do with Perl, mind you.)
===============================================================
Mailing list info:  If at any time you wish to (un|re)subscribe to the list send the
request to majordomo at hfb.pm.org.  All requests should be in the body, and look
like such
                  subscribe anchorage-pm-list
                  unsubscribe anchorage-pm-list



More information about the Anchorage-pm mailing list