develooper Front page | perl.perl5.porters | Postings from August 2001

Re: vstring guidance needed

Thread Previous
Philip Newton
August 21, 2001 09:53
Re: vstring guidance needed
Message ID:
On Mon, 20 Aug 2001 10:43:27 -0400, (John Peacock) wrote:

> I am going to remove the second path entirely, once I make sure that $]
> is a v-string.

$] isn't mean to be a v-string. (See Ronald Kimball's post.)

> If I don't set pNOK, how can I know whether a given PV is a v-string or
> not?

You probably can't, reliably.

> I cannot use IsUTF as a test, since "1.2.3" IS a UTF string (AFAIK).

As far as I know, it is -- and AIUI, it's exactly the same as v1.2.3. That is,
"numbers" with more than one decimal point turn into v-strings, so that 5.6.1 eq
v5.6.1 eq "\5\6\1". I don't think you can distinguish between them. (Except
maybe that some of those are UTF8 while others are not; I'm not sure about that.
But 300.400.500 and v300.400.500 and "\x{012C}\x{0190}\x{01F4}" should be the
same and indistinguishable from one another.)


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About