I had 1 perl script in which we write couple of subroutines. Example:
# Try_1.pl
main();
sub main{
---
---
check();
}
check {
--
--}
Now, i wrote another script Try_2.pl, in which i want to call check subroutine of perl script Try_1.pl.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It sounds like you want to create a module. Try_1.pm (Edit: note extension) should have the following form:
And then Try_2.pl needs to get that code:
That what you’re looking for?