in reply to remove words with regex

XY problem, as usual.

Based on the example, what you actually want is File::Basename.

Replies are listed 'Best First'.
Re^2: remove words with regex
by Fletch (Bishop) on Dec 20, 2024 at 16:04 UTC

    Yurp, or possibly Path::Tiny.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.