use utf8; ... my $scandir = 'something with umlauts it it';