Jonathan Mangin wrote:
> Hi all,
>
> I'm storing a hash (test_time) in the session.
> It appears correct, but please tell me if this is wrong.
>
> $session->param('uid' => $uid,
> 'test_time' => {'e1' => $row[9],
> 'e2' => $row[10],
> 'e3' => $row[11],
> 'e4' => $row[12],
> 'e5' => $row[13],
> 'e6' => $row[14],
> 'e7' => $row[15]});
>
> The real problem is I can't figure out how to retrieve
> any _one_ of the test_time elements. Can someone clue
> me in?
Hello Jon,
The answer is not specific to CGI::Session, but is one of how Perl's
data structures work. I recommend this:
my $href = $ses->param('test_time');
print $href->{e1};
This may also work:
print $ses->param('test_time')->{e1};
But I haven't tested it and find it less clear.
Mark
--
http://mark.stosberg.com/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|