sub ReadFile { my ($fname) = @_; my ($fcont); open (FILE, "<:encoding(UTF-8)", "test.txt") || die ("Can not open file: $test.txt"); undef $/; $fcont = ; close (FILE); return $fcont; }