[Israel.pm] glob function give wrong results
davidlbaird at gmail.com
Sun Mar 20 22:01:17 PST 2005
> > $fname = "w1 Open WebMail.url.abc";
> > print "file name: $fname\n";
> > my @files = glob($fname."*__??-??-????");
> > print "After glob: @files \n";
> > file name: w1 Open WebMail.url.abc
> > After glob: w1 Open
> The problem is the spaces in the name you're passing - the core glob
> function thinks you're passing it multiple patterns.
However, this doesn't explain why the second glob() returns any value.
It should not return "w1 Open" since neither "w1" nor "Open" are files
in the directory.
More information about the Perl