Skip to content

[doc] Don't say $. in "Use of uninitialized value $. in range" #22198

@jidanni

Description

@jidanni
$ perl -lwe '$m=0; print 0 .. ($m?1:11)'
01234567891011

All's OK, but what if the user did

$ perl -lwe '$m=0; print 0 .. $m?1:11'
Use of uninitialized value $. in range (or flip) at -e line 1.
1

All I know is on man perlvar $. is current line number. Therefore please say something else, like, "Maybe you forgot the parentheses." In fact there are two messages that need to get fixed:

$ perl -we 'print 0 .. 0?1:11'
Use of uninitialized value $. in range (or flip) at -e line 1.
Use of uninitialized value $. in range (or flop) at -e line 1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions