in reply to 'use strict;' between libraries

my declares a lexical variable. That is, a variable visible from the point of its declaration to the end of the block where is has been declared. In your case, $pie no longer exists when the control exits from the sub getpied(). On the other hand, in the pie script, $pie exists from its declaratio to the end of the file, and it's visible in the same scope, and only there. But it's another $pie.

To share variables among files, you have to use global variables.