Skip to content

[doc] Please document the $var =~ s{RE}{code}; syntax #23655

@cb-acustaf

Description

@cb-acustaf

Where
All of them?
But specific to regex.

Description

$var =~ s{ put-your-re-here-and-whitespace-is-not-counted }{ put-perl-code-here-which-prints-the-substitution }

The above syntax is not documented anywhere.
I've looked in the manpage, and followed search links to https://perldoc.perl.org/perlre and https://perldoc.perl.org/perlreref and there is no explanation for the syntax.
There are a couple brief examples being used to help explain other features, but this syntax itself is not ever explained.
The engineer part of my brain needs to see the syntax explained.

Thank you.

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