Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

On the importance of reading and pasting error messages

by 1nickt (Canon)
on Jul 14, 2015 at 14:42 UTC ( [id://1134750]=note: print w/replies, xml ) Need Help??


in reply to CGI/JSON and explicit package names.

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)

Global symbol "$lparname" requires explicit package name at 1134744.pl + line 21. Execution of 1134744.pl aborted due to compilation errors.

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.

Replies are listed 'Best First'.
Re: On the importance of reading and pasting error messages
by SuicideJunkie (Vicar) on Jul 15, 2015 at 14:43 UTC

    Actually seeing it can sometimes be surprisingly hard even if you are told exactly where to look.

    The simplest thing to do might be to copy the variable name from its declaration, and paste it over the complaint. Maybe it was an 'rn' vs 'm' or some arcane magic the cat typed in and you just can't see it, but either way copy-paste will fix it.

    If such things continue to be an issue, I recommend changing the editor and/or console to either increase the font size or use a different font with more distinct characters.

      the editor/ console thing might be the root of all the problems here, since i have to use the standard aix vi an a vt console.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1134750]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-24 00:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found