in reply to Passing a variable to a sub process.

In your mkdirs subroutine, you should replace

my $nossl;

with

my ( $nossl ) = @_;

This indicates you want that variable to be populated with the value passed to the subroutine.

If you called mkdirs with two parameters, your subroutine would need to say

my ( $nossl, $arg2 ) = @_;

By the way, you're not calling a subprocess, you're calling a subroutine. A subprocess would be a program or command spawned from your program. A subroutine is a logical part of your program.

One final note: for arcane reasons, you shouldn't put an ampersand in front of the name of the subroutine you're calling. I know the old Camel book did that, but don't.

Revised: for clarity.