"Jay Savage" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> On 4/6/06, Michael Goldshteyn <[EMAIL PROTECTED]> wrote:
>> Point taken about the call to join().
>>
>> With regards to the difference between the two samples, the difference is
>> larger than new-lines. DIR from the command line shows info about file 
>> like
>> their date of last change and size. It also shows how many bytes are used 
>> in
>> the directory being DIRed and how many bytes are free. DIR when called
>> through back-ticks only shows the file names of the files in the 
>> directory
>> specified. Nothing more and nothing less.
>>
>
> Then you're not telling us everything. For me, 'dir' and 'perl -e
> "print `dir`"' produce exactly the same output. This is on Win2k Pro
> since dir is an OS-specific command, I suppose it's possible is
> behaves differently in other windows versions. I don't know, I'm not
> really a windows guy.
>
> I doubt that, though. Do you have your command line dir aliased to
> something? Do you have your DIRCMD environment variable set? It sounds
> like maybe you're calling DIR /B in your perl script for some reason.
> Is the perl script executing as a differnt user with DIRCMD set to DIR
> /B?
>
> Whatever's going on here, it's a system configuration issue, not a perl 
> issue.
>
> HTH,
>
> -- jay

The OS is Windows XP pro and the DIRCMD environment variable is not set. For 
example:

perl -e "print 1 if $ENV{DIRCMD}" outputs nothing

By the way, the output of perl -e "print `dir`;" has:

- All files/dirs with spaces have the spaces escaped with a backslash (e.g. 
a file such as "Hello there.txt" looks like "Hello\ there.txt"
- The output is similar to dir /W, except that the header (volume/directory 
info) and footer (bytes used/free) are missing.
- The files seemed to be ordered in, get this, ASCII order (i.e. files 
starting with upper case chars before files starting with lower case chars)

So, I still don't know the why, but, if you read my later reply to myself, I 
have found the way around this dilemma.

Mike




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to