in reply to Passing hash to package sub and get it returned ..

It is hard to read your code (please add code tags), but it looks like in your this sub, you have
$temp = @_;
Evaluating @_ in scalar context just gives the number of elements, so $temp == 1. You want
my $temp = shift; # or my ($temp) = @_;
Once you process your hash using the $temp hashref, just return the ref:
return $temp;

-Mark

Replies are listed 'Best First'.
Re: Re: Passing hash to package sub and get it returned ..
by Hofmator (Curate) on Apr 02, 2004 at 09:31 UTC
    Once you process your hash using the $temp hashref
    and it might be good to add that elements of the hash pointed to by $temp can be accessed like this:
    $temp->{"Dbox"} = "dbox"; # ^^^^

    -- Hofmator