It looks like you want to create a module. Try_1.pm (extension Change:) should have the following form:
package Try_1; use base 'Exporter'; our @EXPORT = qw(check); sub check { } 1;
And then Try_2.pl should get this code:
use Try_1 qw(check);
What are you looking for?
source share