perl -MO=Xref tst.pl |grep foo tst.pl syntax OK &foo s1 &foo &1, &4 Subroutine foo