On Wed, Feb 27, 2008 at 3:59 PM, vijay krishna <[EMAIL PROTECTED]> wrote: > > the sub routine function in turn uses many other function. Some of these > functions have a return statement and some do not. >
The caller doesn't care about what were enclosed in that function. I need only the last returned value from the called function. > So, when i invoke the sub routine "function" and i pass the returned value > into $str, I need to check if $str has any value assigned or not. > my $str = myFunction(parameter); if (defined $str) { ... } else { ... } Also you need to take care if the function returns a list or a scalar. for a list returned value you need to say: my @str = myFunction(parameter); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/