in reply to another CGI question ... passing values to another script

Well, you could dump the values into a temp file (named with an MD5 hash) or database record, then call the second script with the key as an argument (either via ARGV or QUERY_STRING, depending on whether you want to call it via system or URL), read the values, and delete the temp file / database record. This method has the advantage of letting you pass huge amounts of data.

Or, since you just want to pass a single piece of data, you can pass it directly via system / ARGV or GET query / QUERY_STRING. Though depending on what you want to do (process your variable with a sub in a secondary script?), it might make more sense to use or require or do, like tlm suggests above.

  • Comment on Re: another CGI question ... passing values to another script