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 13:26
Subject:
Re: 8482 busted for $^V sprintf()s on OS/390
Message ID:
Pine.OSF.4.10.10101221325560.270270-100000@aspara.forte.com


On Mon, 22 Jan 2001, Peter Prymmer wrote:

> This one looks very telling:
> 
> $ ./perl -le 'printf "%v", $^V'
> %v$

How about if we try that with a "%vd" format and the 8506 perl kit?

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

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

Same thing again 5 7 0 all on separate lines.

> > 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 -Ilib -le 'use Devel::Peek; Dump($^V)'
SV = PVNV(0x1a8c48b8) at 0x1a8c3c5c
  REFCNT = 2
  FLAGS = (NOK,POK,READONLY,pNOK,pPOK,UTF8)
  IV = 0
  NV = 5.007
  PV = 0x1a8c7b90 "\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

$ ./perl -Ilib -le 'use Devel::Peek; $a = sprintf "%vd", $^V; Dump($a)'
SV = PV(0x1a8c4078) at 0x1a8cfdbc
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x1a8c98c0 "5.7.0"\0
  CUR = 5
  LEN = 6

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