in reply to uninitialized value in array dereference

To expand on chipmunks most excellent post what you are being told is:

You are trying to access an undefined value (as explained by the diagnostic)

This is occuring in the 20th eval that is called when your script runs.

Within this eval the problem is the 15th, 16th and then 22nd line.

What chipmunks code does is capture the warning signal. When a warning is generated this anonymous sub is run. First it prints the warning as normal (warn @_) as the warning message is passed to the sub in @_. The sub then utilises the caller() function to print some details of how the error occurred. Because one sub may call another, which in turn may call another.... caller allows you to specify if you want the caller, the caller's caller, the caller's caller's caller, etc. This is the function of the $i++ which directs caller further and further back until it finds the root caller.

You could use Data::Dumper to dump all your varibale values in this sig warn to make life even easier.

You might as a last resort manually hunt through your script for the possible errant eval statement given all the above details.

cheers

tachyon

  • Comment on Re: uninitialized value in array dereference