[ic] (no subject)
Kevin Walsh
kevin@cursor-software.co.uk
Mon, 9 Apr 2001 17:51:39 +0100
> Quoting Mat Jones - booksellersolutions.com (mat@booksellersolutions.com):
> > Ok I think I should expand more on this....
> > i dont think i provided enough info...here are snippets of my code
> > on a particular page I do a sql search in perl :
> >
> > my $resultset = $dbh->selectall_arrayref($query)
> >
> > and want to use these results on another page so I do:
> >
> > $Values->{final} = @$resultset;
> >
> > This maybe where I am going wrong..
> > on another page I try to access the stored value :
> >
> > return $Values->{final};
> >
> > returns ARRAY(0x8d9154c)ARRAY(0x8dd4314)ARRAY(0x8d5a8bc)ARRAY(0x8d81490)
to
> > the screen and:
> >
> > return $Values->{final}[0];
> >
> > returns nothing.... I am thinking this is because the initial value was
an
> > array ref and somehow is not being dereferenced...
> >
> All i really want is to be able to preserve the value of @$resultset on my
> results page and be able to access it from other pages in the following way
> $$resultset[3][1] within a [perl] tag
>
It seems to me that you could do this one one page:
$Values->{'final'} = $resultset;
then, on another page, do this:
$Values->{'final'}->[3]->[1];
That will probably have the effect that you are looking for.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor-software.co.uk
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/