Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Peculiar incident: printing a variable changes its type

by tobyink (Abbot)
on Nov 13, 2013 at 09:28 UTC ( #1062358=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MDevel::Peek -E'my $x = 1; print "$x\n"; print Dump($x)'
    1
    ...
      REFCNT = 1
      FLAGS = (PADMY,IOK,pIOK)
      IV = 1
    
  2. or download this
    $ perl -MDevel::Peek -E'my $x = 1; print "$x\n"; $x += 0 ;print Dump($
    +x)'
    1
    ...
      PV = 0x9cb43a0 "1"\0
      CUR = 1
      LEN = 12
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2016-10-01 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (6 votes). Check out past polls.