Tuesday, 6 August 2013

perl, subroutine, backticks-style script call

perl, subroutine, backticks-style script call

This code: sub mysub(return`perl myscript.pl $_`;) produces the following
error: "Illegal declaration of subroutine main::mysub."
But print`perl myscript.pl $ARGV[0]`; does not produce any error.
Am I doing something wrong? Can I not use backtick syntax to call another
script from a subroutine?

No comments:

Post a Comment