DOS globbing

D

Dr.Ruud

Have fun:

C:> perl -le "while ( glob q(c:/*.sys) ) {print}"
c:/CONFIG.SYS
c:/IO.SYS
c:/MSDOS.SYS

C:> perl -le "while ( glob q(c:\*.sys) ) {print}"
c:\CONFIG.SYS
c:\IO.SYS
c:\MSDOS.SYS

C:> perl -le "while ( glob q(c:\\*.sys) ) {print}"
c:\CONFIG.SYS
c:\IO.SYS
c:\MSDOS.SYS

C:> perl -le "while ( glob q(c:\\\\*.sys) ) {print}"
c:\CONFIG.SYS
c:\IO.SYS
c:\MSDOS.SYS


C:> perl -le "while ( glob q(c:\\\\\*.sys) ) {print}"
c:\\CONFIG.SYS
c:\\IO.SYS
c:\\MSDOS.SYS

C:\Perl>perl -le "while ( glob q(c://*.sys) ) {print}"
c://CONFIG.SYS
c://hiberfil.sys
c://IO.SYS
c://MSDOS.SYS

C:> perl -le "while ( glob q(c:///*.sys) ) {print}"
c:///CONFIG.SYS
c:///hiberfil.sys
c:///IO.SYS
c:///MSDOS.SYS

C:> perl -le "while ( glob q(c:\/*.sys) ) {print}"
c:\/CONFIG.SYS
c:\/hiberfil.sys
c:\/IO.SYS
c:\/MSDOS.SYS

(etc.)
 
R

robic0

burb...... so what are you trying to say ?
dos console c:\> dir c://IO.SYS doesn't seem to get me anything
niether does this c:\> dir c:\/hiberfil.sys
is 'glob' fucked up, or is this a feature?
 
D

Dave

Dr.Ruud said:
Have fun:

C:> perl -le "while ( glob q(c:/*.sys) ) {print}"
c:/CONFIG.SYS
c:/IO.SYS
c:/MSDOS.SYS

C:> perl -le "while ( glob q(c:\*.sys) ) {print}"
c:\CONFIG.SYS
c:\IO.SYS
c:\MSDOS.SYS

C:> perl -le "while ( glob q(c:\\*.sys) ) {print}"
c:\CONFIG.SYS
c:\IO.SYS
c:\MSDOS.SYS

C:> perl -le "while ( glob q(c:\\\\*.sys) ) {print}"
c:\CONFIG.SYS
c:\IO.SYS
c:\MSDOS.SYS


C:> perl -le "while ( glob q(c:\\\\\*.sys) ) {print}"
c:\\CONFIG.SYS
c:\\IO.SYS
c:\\MSDOS.SYS

C:\Perl>perl -le "while ( glob q(c://*.sys) ) {print}"
c://CONFIG.SYS
c://hiberfil.sys
c://IO.SYS
c://MSDOS.SYS

C:> perl -le "while ( glob q(c:///*.sys) ) {print}"
c:///CONFIG.SYS
c:///hiberfil.sys
c:///IO.SYS
c:///MSDOS.SYS

C:> perl -le "while ( glob q(c:\/*.sys) ) {print}"
c:\/CONFIG.SYS
c:\/hiberfil.sys
c:\/IO.SYS
c:\/MSDOS.SYS

(etc.)

What version of Perl, which platform precisely, which enviroment on that
platform? With Perl 5.8.7 on Windows XP, cmd.exe window, I do not get your
results I get the same set of files each time.
 
D

Dr.Ruud

Dave schreef:
Dr.Ruud:

What version of Perl, which platform precisely, which enviroment on
that platform? With Perl 5.8.7 on Windows XP, cmd.exe window, I do
not get your results I get the same set of files each time.

Windows 2000, Perl 5.8.8.

I get the same set of files too. I should have made clear that this is
not about the files but about the funny treatment (IMO) of the
separators.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,181
Messages
2,570,969
Members
47,536
Latest member
VeldaYoung

Latest Threads

Top