Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I don't understand the rationale for Perl's glob behaviour. Is this a bug or feature or both? :-)
$ ls x x* ls: x: No such file or directory ls: x*: No such file or directory ls: .x*: No such file or directory $ perl -v|head -n 2|tail -n1 This is perl, v5.8.8 built for i486-linux-gnu-thread-multi $ perl -le'print <x>' $ perl -le'print <x.>' x. $ perl -le'print <.x>' $ perl -e'print <x*>' $ ruby -v ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] $ ruby -e'p Dir["x"]' [] $ ruby -e'p Dir[".x"]' [] $ ruby -e'p Dir["x."]' [] $ ruby -e'p Dir["x*"]' []
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl's glob behaviour
by Corion (Patriarch) on Nov 03, 2007 at 09:44 UTC | |
|
Re: Perl's glob behaviour
by tilly (Archbishop) on Nov 03, 2007 at 13:39 UTC | |
by Anonymous Monk on Nov 03, 2007 at 22:39 UTC | |
|
Re: Perl's glob behaviour
by Anonymous Monk on Nov 03, 2007 at 06:31 UTC |