I had heard in the past that ActiveState's distribution had a quirky glob, it that it would only return the correct values for "*.*" instead of "*", but I have just run a test on a NT box and this is what I got...
Orders, Sir? cd \usr\local
Orders, Sir? ls -la
total 0
-d---- 0 3-Mar-100 03:28 .
-d---- 0 3-Mar-100 03:28 ..
-d---- 0 3-Mar-100 03:29 apache
-d---- 0 15-Apr-100 21:37 bin
-d---- 0 7-Dec-99 03:34 cgi-bin
-d---- 0 6-Dec-99 21:58 ftpd
ad---- 0 24-Feb-100 18:24 httpd
-d---- 0 7-Dec-99 02:19 iissamples
-d---- 0 22-Apr-100 22:45 mysql
-d---- 0 6-Dec-99 21:58 scripts
-d---- 0 7-Dec-99 21:11 uia
Orders, Sir? perl
foreach (glob("*")) {
print ++$x.". $_\n";
}
^Z
1. apache
2. bin
3. cgi-bin
4. ftpd
5. httpd
6. iissamples
7. mysql
8. scripts
9. uia
Orders, Sir?
Apart from the current directory and the parent directory, everything got listed, exactly as it would on a real system.
(and I know the contents of \usr\local don't look too much like an NT box, but beleive me! It is! I just don't like the stuff that ships with NT)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.