Sorry if this has been asked before but I can't seem to make SuperSearch do anything except give me errors and the google search is somewhat hard to use on this site.
I'm trying to pass a hash reference from fetchrow_hashref into a function and it's not working.
my $book_hashref = $sel_cursor->fetchrow_hashref;
display_basic($book_hashref);
then
sub display_basic
{
my $book_ref = shift;
print "$book_ref->{'name'}<br>\n";
}
When I run this I get this error:
"my" variable $book_ref masks earlier declaration in same scope at Dis
+playStuff.pm line 100.
syntax error at DisplayStuff.pm line 96, near "sub display_basic"
syntax error at DisplayStuff.pm line 102, near "}"
I'm somewhat new to hash references so if somebody could enlighten me as to what I need to do to make this work (or at least point me at a site I missed during my searching) I would greatly appreciate it. Thanks in advance.