develooper Front page | perl.perl5.porters | Postings from February 2008

Re: [PATCH t/op/pat.t] Re: Change 33313 causing failures

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
February 15, 2008 14:50
Subject:
Re: [PATCH t/op/pat.t] Re: Change 33313 causing failures
Message ID:
20080215225003.GE46892@penkwe.pair.com
On Fri, Feb 15, 2008 at 11:40:38PM +0100, Abigail wrote:
> The latter, I do not understand. If /x/ returns the empty string, and
> the bitwise negation of an empty string is an empty string, why is 
> ~/x/ equal to ~0?

/x/ doesn't return the empty string.  It returns the special false value
sv_no, which has a string value of empty string and a numeric value of 0.
~ prefers the numeric value.

Ronald

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