Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: can i get the value outputed from my subroutine into my program as a value

by wardk (Deacon)
on Aug 15, 2001 at 21:11 UTC ( #105105=note: print w/ replies, xml ) Need Help??


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

I am thinking you want to assign the results of getPassword to $Password... that would be something like:

my $Password = getPassword();

in order to do that you will want to return that password from getPassword...I notice that some code appears missing (you didn't close the subroutine block for getPassword), so maybe you are returning something from getPassword that isn't listed...

something similar to:

my $Password = getPassword(); sub getPassword { # do some stuff to create a password return $password; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://105105]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2016-06-30 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (391 votes). Check out past polls.