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

Re: 8482 busted for $^V sprintf()s on OS/390

Thread Previous | Thread Next
From:
Peter Prymmer
Date:
January 22, 2001 11:48
Subject:
Re: 8482 busted for $^V sprintf()s on OS/390
Message ID:
Pine.OSF.4.10.10101221134060.270270-100000@aspara.forte.com


On Sat, 20 Jan 2001, Simon Cozens wrote:

> On Fri, Jan 19, 2001 at 03:27:05PM -0800, Peter Prymmer wrote:
> > That too can be worked around by commenting out the mention of $^V.
> 
> Very strange. First, I thought this was an obvious result of putting
> the EBCDIC<->Unicode tables in place, but I've realised we haven't put
> them in place! Something's messing up v-strings pretty badly. If you
> have a second, I'd appreciate it if you could try:
> 
> perl -le 'printf "%v", $^V'

This one looks very telling:

$ ./perl -le 'printf "%v", $^V'
%v$

> perl -le 'print ord for split //, $^V'

$ ./perl -le 'print ord for split //, $^V'
5
7
0

> perl -le 'use Devel::Peek; Dump($^V)'

$ ./perl -le 'use Devel::Peek; Dump($^V)'
SV = PVNV(0x1a8c48b0) at 0x1a8c3c54
  REFCNT = 2
  FLAGS = (NOK,POK,READONLY,pNOK,pPOK,UTF8)
  IV = 0
  NV = 5.007
  PV = 0x1a8c7b88 "\5\7\0"\0
  CUR = 3
  LEN = 5

> perl -le 'use Devel::Peek; $a = sprintf "%v", $^V; Dump($a)'

$ ./perl -le 'use Devel::Peek; $a = sprintf "%v", $^V; Dump($a)'
SV = PV(0x1a8c4034) at 0x1a8cfe4c
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x1a8c7ba8 "%v"\0
  CUR = 2
  LEN = 3

Peter Prymmer



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