"my" variable $book_ref masks earlier declaration in same scope at DisplayStuff.pm line 100
the first thing I'd do is search backward in the module from line 100, looking for "$book_ref", to see if it's declared with "my" at some point outside of any other subroutine -- i.e. lexically "global" within the module file (excuse me if those terms are not exactly correct, but I hope you get the idea).
The other possibility, given the nature of the syntax error reports, is that a previous sub or other block is lacking a closing curly brace, causing the "sub display_basic" to be considered as part of some other block of code (which also happens to declare its own "my $boof_ref"); if you use a programmer's text editor that supports automatic indentation (like (x)emacs) -- in the sense that the editor can parse the code well enough to indent a line appropriately, based on the current bracketing depth -- this can help a lot to watch for cases where you've forgotten a close-bracket somewhere.
In reply to Re: Passing hash references into subs
by graff
in thread Passing hash references into subs
by Indomitus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |