in reply to How can i call the subroutine of the shell script and pass certain parameters to it?

Can't be done, perl isn't shell. see system, qx, perlipc

  • Comment on Re: How can i call the subroutine of the shell script and pass certain parameters to it?

Replies are listed 'Best First'.
Re^2: How can i call the subroutine of the shell script and pass certain parameters to it?
by Corion (Patriarch) on Oct 29, 2013 at 13:26 UTC

    Also see do, which would be the closest thing to source in terms of Perl.

    Or maybe Get default login environment, if the objective is "just" to set up some environment.

    Still, defining and then calling shell functions from within Perl requires lots of effort that I'd try to avoid.