develooper Front page | perl.perl5.porters | Postings from November 2003

Re: $^E bug and perl 5.8.0

Thread Previous | Thread Next
From:
Chris Nandor
Date:
November 19, 2003 07:49
Subject:
Re: $^E bug and perl 5.8.0
Message ID:
p06010205bbe14091d147@[10.0.1.177]
At 16:39 +0100 2003.11.19, Rafael Garcia-Suarez wrote:
>What does
>	perl -le 'print $!=22'
>on your system ?

22.

>Can you reproduce this bug with $! in place of $^E ?

I tested, but neglected to mention.  No, $! works fine (unless observing
$^E already changed the value of $!):

$ perl -le '$^E = -1728; print $!+0 for 0,1; print $^E+0 for 0,1'
-1728
-1728
-1728
22

$ perl -le '$^E = -1728; print $^E+0 for 0,1; print $!+0 for 0,1'
-1728
22
22
22

Changing the initial $^E to $! makes absolutely no difference:

$ perl -le '$! = -1728; print $!+0 for 0,1; print $^E+0 for 0,1'
-1728
-1728
-1728
22
$ perl -le '$! = -1728; print $^E+0 for 0,1; print $!+0 for 0,1'
-1728
22
22
22

-- 
Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Development Network    pudge@osdn.com     http://osdn.com/

Thread Previous | 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