Skip to content

[doc] Document sigil can optionally be followed by whitespace #19096

Closed
@jidanni

Description

@jidanni
$ man perlglossary
       sigil
           A glyph used in magic. Or, for Perl, the symbol in front of a
           variable name, such as "$", "@", and "%".

OK, but do document somewhere that this can optionally be followed by whitespace.

$ perl -wle 'use strict; my $      m=4; print $ m;'
4

Not mentioned in perlsyn or perlvar or perlref.

Yes, also mention doing so, though legal, is bad practice. Then perlstyle

       •   No space before the semicolon.

need not also mention

       •   No space after the sigil.

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