I have two file tmp.pl and tmp2.pl. I want to call tmp2.pl with a require command but also send a parameter. Is there a better way of doing this?
tmp.pl
require "tmp2.pl" "passed parameter";
tmp2.pl
print @_;
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.
There’s probably a better way to accomplish whatever it is you’re trying to do, but you could achieve your current sub goal with something like
I might consider this idiom in a place where I wanted to run a perl script from within a perl script. That is, I could say
instead of
(There are plenty of subtle and not-so-subtle differences between these two calls, so a lot depends on what “features” of these calls you need)