in reply to use, require, do or what?

Yeah, pass through a subroutine. So that you can get the return value from your Library.pm code

mainfile.pl
package Library.pm $output = Library::subroutine($variable)
Library.pm
sub subroutine { $variable = shift $variable = changingthedata($variable) return $variable }
-Actualize