in reply to Perl form user input

You are trying to trim the input from surrounding whitespace, not doing it wrong.

Replies are listed 'Best First'.
Re^2: Perl form user input
by Anonymous Monk on Jun 10, 2019 at 06:01 UTC
    s/not/but/