Hi lou, I don't quite understand your logic-block here... Are you trying to redirect people to a login page if they're not logged in? If that's the case, you might want to print a standard HTTP redirect header instead of using exec(). Or better yet, take your login code out of game-log.pl and create a function which you can call from your main script.
Of course, as always, you'll get further, faster if you: use CGI qw(param); and access your parameters like this: param("paramName"); If you want to print a redirect header, you can use the builtin function in the CGI module, or simply print "Location: login_script_URL.pl\n\n"; NOTE: because this line is an HTTP header, it must be printed before any other output is sent to the client. If you're convinced that you need to use exec() to do what you want, make sure your script can find the file.... try wrapping your exec() call in a conditional statement to test if the file can be found like this: if(-e "game-log.pl"){ exec "game-log.pl"; }else{ print "AIEEE!!!!! can't find game-log.pl!"; } I suspect this might be the problem. Hope this helps... good luck. -Peter -----Original Message----- From: Luinrandir Hernsen [mailto:[EMAIL PROTECTED] Sent: Saturday, March 29, 2003 6:16 AM To: Peter Kappus Subject: exec still not working OK.. here are the facts My .pl program is in cgi-bin/game/game-log.pl it is the log on page. the game is in the same dir and is supposed to go to the log-in .pl (game-log.pl) if you try to start the game incorrectly. Here is the code. The .pl prints the "done" statement, so I know the code is going to the else condition, but the exec "game-log.pl"; part is not running. I have the chmod set at 755 and it works when you start the game with it... but will not work from the other .pl Did i make sense? Please help?!?!? Lou $input = $ENV{QUERY_STRING}; if ($input) { @pairs = split ( /&/, $input ); foreach $pair(@pairs) { ( $name, $value ) = split ( /=/, $pair ); $form{$name} = $value; } ##play game code , this part works!!! } else { print "done"; exec "game-log.pl"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]