in reply to Re^2: Converting to uppercase and wrapping ''
in thread Converting to uppercase and wrapping ''

next if $mk =~ /uc qq{'$folder'}/i;

You want:

next if $mk eq $up;