Help for this page

Select Code to Download


  1. or download this
    for my $str (qw[YES YE Y yes ye y YS ES S ys es s YEESS YYYEEs]) {
        say "$str: ", "yes" =~ /^\Q$str/i ? "ok" : "not ok";
    ...
    s: not ok
    YEESS: not ok
    YYYEEs: not ok
    
  2. or download this
    say "ok" unless index "yes", lc $str;