I think you wanted:
my $perl = do "a.pl"; [download]
You're missing the do.
In reply to Re: subroutine ref while "strict refs" by tobyink in thread subroutine ref while "strict refs" by sathish_cudd