in reply to Calling functions from other scripts

What you want is a perl module file. The basics are documented in the documentation of perlmod under "Modules" .

Here is a trivial example: This script uses say_hello:

#! perl -w use strict; use warnings; use mystuff; mystuff::say_hello "world";

... and say_hello is defined in this script, which should be saved as "mystuff.pm" in the same directory.

#! perl -w use warnings; use strict; package mystuff; sub say_hello { print "hello " . shift() . "\n"; } 1
If you run the first script above with

$ perl -w example.pl
it will print

hello world