develooper Front page | perl.perl5.porters | Postings from April 2000

command shell examples in README.win32

Thread Next
From:
A. C. Yardley
Date:
April 3, 2000 09:37
Subject:
command shell examples in README.win32
Message ID:
2483.000403@tanet.net
I'm not sure whether these "ought" to be reported as bugs or not,
especially #2 below.  For all I know, this may now be correct
behavior.

I executed each of the below one-liners, which examples are included
in the README.win32 distributed with perl 5.6.0, in cmd.exe on
Win2000 Server Beta 3.

/acy

#===================================================================

Example #2:

        This does the same:
        
             perl -e "print \"\\\"\\\"\" "

REMARKS: Under v5.6.0, this example fails with,

Backslash found where operator expected at -e line 1, near ""\\"\"
        (Missing operator before \?)
syntax error at -e line 1, near ""\\"\"
Execution of -e aborted due to compilation errors.

NOTE: The example works correctly under v4.005_03.

#====================================================================

Example #6:

        This pipes "foo" to the "less" pager and prints "bar" on the
        console:

            perl -e "print 'foo'; print STDERR 'bar'" | less

REMARKS: Under v5.005_03, this example fails with,

foo

But under v5.6.0, it prints

barfoo

NOTE: I do not know whether or not this is correct behavior.
Perhaps, the pipe to STDERR should complete before the print to
STDOUT.  Doesn't seem quite right to me, but ...

#====================================================================

Example #6:

        This pipes "foo\nbar\n" to the less pager:

            perl -le "print 'foo'; print STDERR 'bar'" 2>&1 | less

REMARKS: Under v5.005_03, this example prints
foobar

But under v5.6.0, the example prints

barfoo

NOTE: Again, I'm uncertain about the order, but, curiously, a print
to STDERR appears to complete and return before a print to STDOUT.
Is this correct behavior?

#====================================================================



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About