in reply to can i get the value outputed from my subroutine into my program as a value

First: that what subs are for (to return a value to the main process)

Serveral things went wrong here:

&getPassword = my $Password;
must be :
my $Password = &getPassword;
and your password subroutine has to return a value, which then is assigned to $Password in your main program part
my $password = &getPassword; print "$password\n"; sub getPassword { my $pass = 'willi'; return $pass; }
This will give you an willi as output.
Hope this will help.
----------------------------------- --the good, the bad and the physi-- -----------------------------------