Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
On the importance of reading and pasting error messagesby 1nickt (Canon) |
on Jul 14, 2015 at 14:42 UTC ( [id://1134750]=note: print w/replies, xml ) | Need Help?? |
Another great example of why it's important to actually paste the actual error message when asking a question. Your error message was (when I pasted your code into my boilerplate)
When it tells you that, it means you are using a variable that hasn't been declared. To you that doesn't make sense because you can't see the one-character typo no matter how long you stare at your screen. (If it sounds like I am speaking from experience, it is because I am speaking from experience.) So you say to yourself "Self, I know I declared my $lparname, dammit! I'm off to PM to ask for help (without pasting the error message) ..." NO!! Don't do it! Instead, say to yourself, "Self, I know I declared my $lparname, dammit! But if Perl says I didn't, I guess the first thing to do is have look at the statement where I declared it." And then when you get there, you know there's going to be a typo, because Perl just told you, so you can see it! HTH :-)
The way forward always starts with a minimal test.
In Section
Seekers of Perl Wisdom
|
|