http://qs1969.pair.com?node_id=619554

ikkeniet has asked for the wisdom of the Perl Monks concerning the following question:

This is probably a stupid beginners question but one has to begin somewhere...

I have a perl file that contains a whole bunch of subroutines. I have a set of different perl scripts that would reuse the subroutines so that I do not have to copy paste the routines all the time.

An important question I have regarding this is that when above is possible, are the variables then known in the load shared library.

Example:
mainscript.pl
$hello="hello123"; &hello;


routines.pl contains
sub hello { print $hello; }