>  I'm not very familiar with cgi-scripting.  So I can debug this, how
>  can I pass the argumens (user + passwd) to nlogin.pl from a shell?
>  (i.e. so I can run nlogin.pl from a shell and debug what's going on).

Let's imagine that you have a script with two arguments, let's say,
username and message number.

You normally have a URL that looks like this:
http://www.yourserver.com/cgi-bin/myprogram.cgi?u=john&n=47

At some point in your CGI program, you are getting the values 'john'
and '47' into variables $username and $message_number, let's say.

Well, what you could do is this:

unless(defined($username)) {
        $username = shift || 'mydefault';
}
unless(defined($message_number)) {
        $message_number = shift || 1;
}

When you run the script from the command line, you can specify arguments,
OR you can leave them off to use your defaults.

You'll probably want to remove this code when you move into production.

--Jimbo

Reply via email to