in reply to can i get the value outputed from my subroutine into my program as a value
Serveral things went wrong here:
must be :&getPassword = my $Password;
and your password subroutine has to return a value, which then is assigned to $Password in your main program partmy $Password = &getPassword;
This will give you an willi as output.my $password = &getPassword; print "$password\n"; sub getPassword { my $pass = 'willi'; return $pass; }
----------------------------------- --the good, the bad and the physi-- -----------------------------------
|
|---|