File::Glob bug ?

From: Jaap Karssenberg (j.g.karssenberg_at_student.utwente.nl)
Date: 06/28/04


Date: Mon, 28 Jun 2004 03:39:09 +0200

The following script:

  use File::Glob ':glob';

  my @test = (
    '{random string}',
    '\\{random string\\}'
  );

  for (@test) {
    print "glob: $_ ==> ";
    print bsd_glob($_, GLOB_TILDE | GLOB_BRACE | GLOB_NOCHECK);
    print "\n";
  }

has the following output:

  glob: {random string} ==> random string
  glob: \{random string\} ==> \random string\

I believe this to be wrong, because since I have no file called 'random
string' and the GLOB_NOCHECK option is in effect the _original_ pattern
should be returned.

Anyone any idea what happens there and/or if I am right when I think
this behaviour is wrong and/or who is responsible and/or who I should
bug with this ?

-- 
   )   (     Jaap Karssenberg || Pardus [Larus]                | |0| |
   :   :     http://pardus-larus.student.utwente.nl/~pardus    | | |0|
 )  \ /  (                                                     |0|0|0|
 ",.*'*.,"   Proud owner of "Perl6 Essentials" 1st edition :)  wannabe


Relevant Pages

  • Re: Perl script to extract data from webpage? (knucklehead newbie).
    ... Your $& is a special perl variable that represents the string matched by ... the last successful pattern match...which in the case of your example ... I have this running now using a script I found elsewhere, ...
    (comp.lang.perl)
  • Re: perl + regex bug?
    ... this issue, and now that i've found a workaround, i'm wondering if the ... bug that has never been detected or repaired. ... NEVER use $1, $2, $3 etc without first assuring that the pattern match ... you're trying to grab a single digit out of a string. ...
    (comp.lang.perl.misc)
  • Re: A character string matches a hex numeric pattern
    ... In an awk script I have a pattern ... that the string "Note:" should not have matched the ... I repeat: anchor the pattern to the beginning of the string: ...
    (comp.lang.awk)
  • Re: ACT scripting
    ... While executing the the script send by you..I am getting the following ... > 1) Assuming the pattern you are looking for is unique in the file, ... > 'string to search ... > Regular Expressions. ...
    (microsoft.public.scripting.vbscript)
  • Re: command line find replace with vim
    ... I am making a script to replace a particular string with some other ... This works fine for me if there is a string that matches the pattern. ... Bart suggested argdo - you could combine that as well - automating the whole ...
    (comp.editors)