bcrowell2 has asked for the wisdom of the Perl Monks concerning the following question:
O monks,
I observe that the following two examples behave differently:
perl -e 'use File::Glob; while ($x=File::Glob::csh_glob "a.a") {print +"$x\n"; sleep 1} print "$x\n"' perl -e 'use File::Glob; while ($x=File::Glob::bsd_glob "a.a") {print +"$x\n"; sleep 1} print "$x\n"'
The file a.a exists in the current working directory. The bsd_glob version does what I expect, which is to loop forever, but the csh_glob version exits after one iteration. Does anyone understand this? Thanks in advance,
-Ben
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strange behavior of csh_glob versus bsd_glob
by liverpole (Monsignor) on May 19, 2007 at 19:40 UTC | |
by bcrowell2 (Friar) on May 19, 2007 at 19:57 UTC | |
|
Re: strange behavior of csh_glob versus bsd_glob
by Zaxo (Archbishop) on May 19, 2007 at 19:36 UTC |