in reply to Re: Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
in thread Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
use Devel::Peek; use strict; no warnings "numeric"; sub xx { my $arg=shift; Dump( $arg ); print "ARG+1=".($arg+1)."\n"; } xx("ff"); xx(7); xx("ff"); __END__ SV = PV(0x729b78) at 0x754ae0 REFCNT = 1 FLAGS = (PADMY,POK,pPOK) PV = 0x747d90 "ff"\0 CUR = 2 LEN = 8 ARG+1=1 SV = PVNV(0x72b5f0) at 0x754ae0 REFCNT = 1 FLAGS = (PADMY,IOK,pIOK) IV = 7 NV = 0 PV = 0x747d90 "ff"\0 CUR = 2 LEN = 8 ARG+1=8 SV = PVNV(0x72b5f0) at 0x754ae0 REFCNT = 1 FLAGS = (PADMY,POK,pPOK) IV = 7 NV = 0 PV = 0x747d90 "ff"\0 CUR = 2 LEN = 8 ARG+1=1
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
by BrowserUk (Patriarch) on Jun 15, 2013 at 19:20 UTC | |
Re^3: Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
by cheesestraws (Novice) on Jun 16, 2013 at 09:44 UTC | |
by Anonymous Monk on Jun 16, 2013 at 11:26 UTC |
In Section
Seekers of Perl Wisdom