Michael Goldshteyn wrote:
> That is, why does the output differ between:
>
> perl -e "print join(\"\n\",@{[`dir`]});"
>
> and
>
> dir | perl -pne ""
$ which dir
$ alias dir
alias dir='ls -l'
$ unalias dir
$ alias dir
bash: alias: dir: not found
$ which dir
/usr/bin/dir
It looks like the first
On Thu, 2006-06-04 at 13:35 -0500, JupiterHost.Net wrote:
> perl -e 'print for `dir`;'
>
> Is even sexxierr :)
dir /w
Not sexy but simple.
--
__END__
Just my 0.0002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Michael Goldshteyn schreef:
> 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
"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 comman
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
ad more I anticipate more people running into this issue when they
try to invoke cmdlets as executables.
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Michael Goldshteyn
Sent: Thursday, April 06, 2006 12:02 PM
To: beginners@perl.org
Subject: Re: Why does dir produ
The answer to my own question in the OP.
There is a difference, because the following should be performed to get the
behavior of: dir | perl -pne ""
perl -e "print `cmd /C dir`;"
the cmd /C part is required to get equivalent behavior.
Mystery solved!
"Michael Goldshteyn" <[EMAIL PROTECTED]> w
Michael Goldshteyn wrote:
Point taken about the call to join().
perl -e 'print for `dir`;'
Is even sexxierr :)
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 chang
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
On 4/6/06, Michael Goldshteyn <[EMAIL PROTECTED]> wrote:
> That is, why does the output differ between:
>
> perl -e "print join(\"\n\",@{[`dir`]});"
>
> and
>
> dir | perl -pne ""
First of all, you haven't told us how it differs. Since dir is an
os-specific command, most of the people on this list
Michael Goldshteyn wrote:
What does different environments mean? Why should the two uses of dir differ
in their output?
because system calls rely on you ENV via CLI and %ENV when called in
perl. (IE *you* are executing it in CLI and *perl* is executing it when
using backticks = different e
What does different environments mean? Why should the two uses of dir differ
in their output?
"Mr. Shawn H. Corey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 2006-06-04 at 10:42 -0500, Michael Goldshteyn wrote:
>> That is, why does the output differ between:
>>
>> perl
On Thu, 2006-06-04 at 10:42 -0500, Michael Goldshteyn wrote:
> That is, why does the output differ between:
>
> perl -e "print join(\"\n\",@{[`dir`]});"
>
> and
>
> dir | perl -pne ""
Different environments. Use File::Find instead. See `perldoc File::Find`
for details.
--
__END__
Just my 0.
13 matches
Mail list logo