No, there is no way for a called (forked or spawned) program to export values back up the calling chain. You have only two options for passing any sort of data back up the chain. The first is the return value, but you really ought not to use that for arbitrary data values. Its use is so ingrained as a status flag for the completion of the child that to use it for anything else would just cause confusion and other problems in the long term. So, instead you might want to use the second option which is IPC or general I/O, neither of which I'm guessing is trivial in csh.
Which brings me neatly to the next point. You have read csh programming considered harmful haven't you? It's over 15 years old now and is as true today as it was back then. I would therefore humbly suggest that you would be much better off in both the short term and the long term if you were to bite the bullet and rewrite your csh script as perl for all the reasons mentioned in Tom's paper as well as to make the passing of data between your pieces of perl code so much simpler.
Of course, that's probably not what you wanted to hear.
In reply to Re: CSH script that calls a perl script
by hippo
in thread CSH script that calls a perl script
by mark4444az
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |