use Encode; # add this if you don't have it already if ( param('select') ) { #If User selected an item from the drop down menu my $selected_file = decode('utf8', param('select')); unless ( grep { $_ eq $selected_file } @display_files ) #If User Selection doesn't match one of the passages then its a Fraud! { ...