in reply to What's wrong with my syntax?
Just to expand on what Improv mentioned at the end of his post... Pretty much everywhere you use local in your code, you should be using my instead.
For information on the differences between my and local, see the FAQ, or this excellent article from The Perl Journal called Coping With Scoping. There are also various nodes on PM talking about it; just search for "my local".
The specific reason why the local's are giving you an error is because they work on global variables, not lexicals. Since you're using strict (good job!) and haven't previously declared those variables as global, you get an error. But really, since you don't use the variables anywhere outside the sub you're localing them in, there's no reason for them to be globals. Hence, you should use my instead. :)
Update: Added some clarification.
bbfu
Black flowers blossom
Fearless on my breath
|
|---|