in reply to Re: How to pass Windows filepaths on command line
in thread How to pass Windows filepaths on command line

I'm using Getopt::Lucid. Everything works fine on Unix.
my $in_file = $opt->get_file; open(my $fh, "<:encoding(utf8)", $in_file) or die "Could not open $in_file: $!";

Replies are listed 'Best First'.
Re^3: How to pass Windows filepaths on command line
by toolic (Bishop) on Aug 28, 2014 at 17:57 UTC
    Your error message has single quotes, but your code does not. Try without the single quotes:
    perl test.pl --file=test.txt