At 08:46 24.05.2001 +1000, you wrote:
><snip>
> $sth->finish;
> #print "sumSales:\t$sales, $count\n\n";
> if (@row){return @row};
>}
Probably has nothing to do with your problem, but as a matter of habit, I
like passing around references instead of entire arrays or hashes.
Try returning \@row, which will give you a reference to that array in your
call, ie.
my $sales = myMod::sumSales(@arg);
now $sales (if your function returns correctly) is an array which you can
access by using $sales->[0]
>The sub is called like:
>
>my @sales = myMod::sumSales(@arg)
> || die "Unable to complete sumSales routine: $!\n";
>where @arg only has one element.
>
>The doco about return says "The supplied expersion will be evaluated in the
>context of the subroutine invocation. That is, if the subroutine was
>called in
>a scalar context , EXPR is also evaluated in a scalar context. If the
>subroutine was invoked in a list context then EXPR is also evaluated in a
>listcontext and can return a list value."
>
>I'm guessing that this is the problem but have no idea what it means...
>
>Any help would be appreciated.
>
>Thanks
>
>
>john
Aaron Craig
Programming
iSoftitler.com