Perhaps you are confusing .* and $.?
In reply to Re: regex/perl question about uninitialized value by JavaFan in thread regex/perl question about uninitialized value by TheBigAmbulance