http://qs321.pair.com?node_id=11153164


in reply to Re^2: 'switch' and 'smartmatch' features deprecated in 5.38
in thread 'switch' and 'smartmatch' features deprecated in 5.38

Although one should first check the keys are all single letter for this case, otherwise one will get matches for words like haft, vatful and thrive.

Replies are listed 'Best First'.
Re^4: 'switch' and 'smartmatch' features deprecated in 5.38
by ibm1620 (Hermit) on Jun 28, 2023 at 18:59 UTC
    %opts was populated by Getopt::Std, so the keys are guaranteed to be one character.