Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Yet Another Unitialized Value Question

by pijll (Beadle)
on Sep 22, 2003 at 22:11 UTC ( [id://293311]=note: print w/replies, xml ) Need Help??


in reply to Yet Another Unitialized Value Question

The line numbers reported by perl do not always indicate the exact place of the error/warning. An error in a multi-line statement is always reported as if it was on the first line of the statement. In particular, if there is an error in an elsif condition, it is reported with the line number of the corresponding if.

Your if ($lock) should not generate the warning you got, so take a good look at your elsif.

  • Comment on Re: Yet Another Unitialized Value Question

Replies are listed 'Best First'.
Re: Re: Yet Another Unitialized Value Question
by doorslam (Beadle) on Sep 23, 2003 at 10:54 UTC

    Ah, I wondered about that. I thought it might be reporting that line number due to an error inside the if block, did not realize it would report the elsif statements back as that line number. I'll take a look at that.

    Thanks!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 17:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found