On Tue, 28 Aug 2001 [EMAIL PROTECTED] wrote:

> Ok.  Now I can call a Perl program from another Perl program but I am 
> having trouble returning values back to the calling Perl program.  Return 
> does not seem to work,  Any suggestions??
> 

Well... It totally depends one what you are doing.  It would be infinitely
more helpful if you could include some of the offending code.

Are these programs you have written yourself?  or are they other modules
or something.

Perl, by default will return() the last evaluated statement in a sub.

so:

sub foo {

  $foo = 1;

}

if you say:

$bar = foo();

$bar will equal 1.  That's the general idiom. You don't need return
statements, but they help you define exactly what you want to return.

How exactly are you assessing whether or not values are being returned?

Chris


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to