> >sub GetUser
> >{
> >     my ($id, $user)=@_;     # record number and hash reference to
> >populate
> >
> >     if (defined($UserCache[$id])) {
> >        $user = $UserCache[$id];                             
>                
> >        return(1);                                           
>                
> >     }
> >
> >     # Store the info from the DB for later
> >     $UserCache[$id] = $user;
> >
> >     return 1;
> >}
> 
> To change the value PASSED to the function, you must modify the
> corresponding element in @_:
> 
>   $_[1] = $UserCache[$id];

Tried it, didn't work.  When the select from the database is made, and
populates $user->{FieldName}, I'm populating "$user", not $_[1], so why
would I have to operate any differently when referencing a different source
of the data?  I know data is getting in to the cache because
$UserCache[$id]->{'Name'} prints out the data I expect.  It just isn't
getting back to the sub that called GetUser (yes, I checked many times to
make sure I'm passing \%user).


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

Reply via email to