You want to remove the 'my' from the $dat declaration, which declares the variable to be lexical (and local to that block).
- Tom > -----Original Message----- > From: Andy Crichton [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2003 8:51 AM > To: [EMAIL PROTECTED] > Subject: beginner -> problem with [+ $row $col notation with > DBI selectall_arrayref > > > Hi, > My problem is that I get no output from this. > > > " > [- > > use My::Module; > > my $dat=GetSomeStuff($req->{dbh}); #returns reference to > array of arrays > (result of selectall_arrayref) > > # If I uncomment this I see my > data before the HTTP headers as I would > expect. > #foreach (@{$dat}) { # This proves that $dat is what I think > it is and contains data # foreach (@{$_}) { > # print > #} > -] > > > Some Random Text > > <table> > <tr><td> > [+ $dat -> [$row][$col] +] > </tr></td> > </table> > > " > > For the table part I just get <table></table> > it is like $dat has gone out of scope between the [- and the > [+ but this is not what I expected > > > I suspect this is a stupid mistake somewhere on my part which > may be glaringly obvious to someone. > > Many thanks in advance > > Andy Circhton > > > __________________________ > This email and any files transmitted with it are confidential > and intended solely for the use of the individual or entity > to whom they are addressed. The contents are confidential and > may be privileged. Any views or opinions expressed are those > of the sender and may not reflect the views or opinions of > the company and the company accepts no liability in respect > thereof. If you have received this email in error please > notify [EMAIL PROTECTED] immediately. > > ______________________________________________________________ > __________ > This e-mail has been scanned for all viruses by Star > Internet. The service is powered by MessageLabs. For more > information on a proactive anti-virus service working around > the clock, around the globe, visit: http://www.star.net.uk > ______________________________________________________________ > __________ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]