[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#254045: -d bug: not a bug?

I believe this is not a bug. I suspect you entered a unicode character
that looks like "-" but is not. Getopt::Std fails to get options unless
the option dash is exactly Here's a program that you can use to test it.

  use Getopt::Std;
  use Data::Dumper;

  ($c) = $ARGV[0] =~ /^(.)/;
  print "Character $c is ord(" . ord($c) . ")\n";

  print Dumper \%new_opts;

When I run the program, I get:

  $ perl a -d 'before 6/1/04'
  Character - is ord(45)
  $VAR1 = {
            'd' => 'before 6/1/04'

But when I copy and paste "-" from the website for your bug report I get:

  $ perl a ???d 'before 6/1/04'
  Character ? is ord(226)
  $VAR1 = {};

Please confirm and either provide more information or close the bug as
"not a bug".


David Coppit                                       http://coppit.org/

Reply to: