embperl 'subs' do not return subroutine values.
you need to either make a regular subroutine
[- sub get_date { ... } -]
or use a global variable for return values. such as @GLOBAL. kind of ugly - but is it
any uglier than @_ for the input values?
"Genocchio, Anthony" wrote:
> I am having trouble returing a variable from a sub?...below is my effort to
> do this...is there some fundamental place where i am going wrong and can you
> help me?!...thanks
>
> [$ sub get_date $]
> [-
> $var = shift;
> --snip---
> $date = ($mday."-".$mth."-".$year);
> return[$date];
> -]
> [+ $date +]<BR>
> [+ $var +]<BR>
> [$ endsub $]
>
> [-
> use DirHandle;
--
___cliff [EMAIL PROTECTED]http://www.genwax.com/