I searched but I could not find if there is any command that will allow me to see which Perl files are requiring another Perl file. I am just trying to see a sample program that uses a specific subroutine in one the Perl files that already exists in my work database but am unsure how to do this or if it is even possible. For example, one file might say:
require $file_a or die;
&subroutine_a_from_file_a();
and the other file would have the subroutine:
sub subroutine_a_from_file_a{
# do stuff necessary for another file
}
Is there any way to see the first file from the Unix command line if I did not already know about it’s existence?
Could just grep for any file mentioning the sub in question: