nikolay has asked for the wisdom of the Perl Monks concerning the following question:

What does mean the eval and line indexes i have in error message on my regexp as follows:

Use of uninitialized value $1 in concatenation (.) or string at (eval 292) line 1.

Here it is 292 and 1 . -- From which point it is counted? Thank you.

Replies are listed 'Best First'.
Re: Meaning of error message of regexp.
by Athanasius (Archbishop) on Sep 30, 2015 at 14:42 UTC
      Thank you very much, Athanasius.
Re: Meaning of error mesage of regexp.
by neilwatson (Priest) on Sep 30, 2015 at 13:45 UTC

    Please show the lines of code. But, I guess that you are using the match variable from a regex that never matched, thus $1 is undefined.

    Neil Watson
    watson-wilson.ca

      It is true. I have a lot of data (pairs: what to change w/ what). And in example i missed () to organize it to $1. -- All this i know, what here i do not know is the index used by PERL. -- As my data is somewhat big, i would like to use the error message i get -- to easily find the place in the data, that does not have in example () but has in exchange $1. So, from which is it counted?
Re: Meaning of error mesage of regexp.
by MidLifeXis (Monsignor) on Sep 30, 2015 at 14:09 UTC

    Additionally, "eval 292" means the 292nd eval that was called. I would look around that point in your data file for a malformed line (or line 292 / $num_evals_per_loop).

    --MidLifeXis

      It goes like this

      $sod=~s#$bz_tek[$i]#$bz_tek[$i+1]#gee;

      So, does 292-th means $i=292 ?