CUFP
Mur
snippet
<div class="Description">I had a need for functionality I'd written in a stand-alone script. The script read two different databases for the corresponding table, and compared the rows, burping out the primary key of the rows which were identical. But it did so in the form of a formatted report. I really didn't want to rewrite the script to produce a parseable output, nor did I want to write the new script to parse the report. So I had the new script <code>require</code> the old one, and "possess" its variables beyond the grave...</div>
<CODE>
use vars '@keywords';
open(NULL,'/dev/null');
my $h = select(*NULL);
# This script leaves all its results in @keywords,
# and writes a flowery report that we ignore.
require 'other_script.pl';
select($h);
# and @keywords has all the stuff we want.
</CODE>