kosta has asked for the wisdom of the Perl Monks concerning the following question:
it dies on scalar($resource) saying "Not an ARRAY reference at ..." When I printed it out it turns out that if I do print $res in my script it says ARRAY(0xSOMETHING) if I do it in the module print $resource it says HASH(somethingXsomething)my $res= $db->select('SOME SELECT') $my_module-> parse ($res, $something_else); #this is my parse function in the module: my ($resource, $something ) = @_; ... for (my $i=0; $i<scalar($resource); $i++) { #some code }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array expected hash given
by TomDLux (Vicar) on Feb 14, 2011 at 20:39 UTC | |
by kosta (Sexton) on Feb 14, 2011 at 21:14 UTC | |
|
Re: array expected hash given
by ciderpunx (Vicar) on Feb 14, 2011 at 20:58 UTC |