in reply to How to pass Windows filepaths on command line

Show us your code that parses @ARGV. Are you using Getopt::Long? Show your open code.
  • Comment on Re: How to pass Windows filepaths on command line

Replies are listed 'Best First'.
Re^2: How to pass Windows filepaths on command line
by bangor (Monk) on Aug 28, 2014 at 17:53 UTC
    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: $!";
      Your error message has single quotes, but your code does not. Try without the single quotes:
      perl test.pl --file=test.txt