in reply to regex/perl question about uninitialized value

$. is a read-only variable, returning the line number of the last read line. It's undefined because you haven't read any.

Perhaps you are confusing .* and $.?

Replies are listed 'Best First'.
Re^2: regex/perl question about uninitialized value
by jwkrahn (Abbot) on Nov 03, 2011 at 18:39 UTC
    $. is a read-only variable

    $. is definitely NOT read-only.