> Anyone know if it's possible for the return/exit value of a script, in the > event of success, to be something other than 0? > The 'exit' command should work just like it does in the shell: 'exit 9;' for example, *should* give you an exit status of 9 (although I couldn't get it to work for me a minute ago...).
> I want to call, from a shell script, a perl script that determines a certain > record ID from a database. When the ID has been obtained, the script would > exit, and the calling shell script would receive the returned value. > Why muck around with exit statuses? Just have the perl script print the value you want, then in your shell script you can do something like: myID=`perl_script_to_return_ids` Or just do it all in Perl. 8-) > The 'return' command doesn't allow this - I've thought of setting an env > variable - not sure how to export it from perl so the environment sees it. > Would like to get plan A to work first though.. Impossible. You can't run a subcommand and have it set a variable for the calling shell. If Peter Parker gets bit by a radioactive spider and gains spidey-powers, he could pass those powers to his kids--but never his parents. Paul ------------------------------------------------- "Welcome to downtown Coolsville--population: us." ------------------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]