use Path::Tiny qw/ path /; select my $bar = path("~/output.txt")->opena_utf8; print "Hello world!\n";