in reply to shared variables
In testlib.pl, write:
$| = 1; sub test{ $var = "Lord only knows if this will work..."; } 1; [download]
In your main program, write.
require 'testlib.pl'; $| = 1; print "Content-type: text/html\n\n"; test(); print "$var"; exit; [download]