Indomitus has asked for the wisdom of the Perl Monks concerning the following question:
thenmy $book_hashref = $sel_cursor->fetchrow_hashref; display_basic($book_hashref);
When I run this I get this error:sub display_basic { my $book_ref = shift; print "$book_ref->{'name'}<br>\n"; }
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."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 "}"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing hash references into subs
by Abstraction (Friar) on Jul 18, 2002 at 03:29 UTC | |
|
Re: Passing hash references into subs
by thelenm (Vicar) on Jul 18, 2002 at 03:33 UTC | |
|
Re: Passing hash references into subs
by graff (Chancellor) on Jul 18, 2002 at 04:49 UTC | |
|
Re: Passing hash references into subs
by Indomitus (Scribe) on Jul 18, 2002 at 03:40 UTC | |
by Abstraction (Friar) on Jul 18, 2002 at 03:49 UTC | |
|
Re: Passing hash references into subs
by cfreak (Chaplain) on Jul 18, 2002 at 04:02 UTC | |
by thelenm (Vicar) on Jul 18, 2002 at 04:06 UTC |