I recently just starting using
Devel::Peek to look at my data structures. I love it. After reading the module doco you get an idea of the output from Devel::Peek and the structure of what you are seeing. It shows a wealth of data about your objects, hashes, variables, their types, reference counts, length, size, addresses and so on. It will even show what class your objects are blessed into. Very cool!
Note: It will only show the first 4 elements of a structure unless you specify for it to show more by sending it an additional integer. eg. Devel::Peek::dump(\%hash, 8)
For example this is 4 element dump of my %hash:
SV = RV(0x1a7ba4c) at 0x1bd1e98 <<--## a scalar that is a ref
REFCNT = 1 <<--## Its ref count
FLAGS = (TEMP,ROK)
RV = 0x1b5e014 <<--## The ref value
SV = PVHV(0x1b25384) at 0x1b5e014 <<--## the scalar ref points to a
+ hash
REFCNT = 2 <<--## The hashes ref count
FLAGS = (PADBUSY,PADMY,SHAREKEYS)
IV = 1
NV = 0
ARRAY = 0x1a49e84 (0:7, 1:1)
hash quality = 100.0%
KEYS = 1
FILL = 1
MAX = 7
RITER = -1
EITER = 0x0
Elt ".*" HASH = 0xaeb62926 <<--## First element of hash
SV = RV(0x1a7ba3c) at 0x1bd1e8c <<--## is a scalar ref
REFCNT = 1
FLAGS = (ROK)
RV = 0x1bce2c4
SV = PVAV(0x1bcb7c4) at 0x1bce2c4 <<--## which points to an arra
+y with 5 references
REFCNT = 5
FLAGS = ()
IV = 0
NV = 0
ARRAY = 0x1a49634
FILL = 1
MAX = 1
ARYLEN = 0x0
FLAGS = (REAL)
Elt No. 0 <<--## Element zero of that array
SV = PV(0x1b3dbf0) at 0x1bd8098
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x1a4980c "return_me"\0 <<--## its value
CUR = 9
LEN = 10
Elt No. 1 <<--## ... and so on
SV = PV(0x1a6097c) at 0x1bd80b0
REFCNT = 1
FLAGS = (POK,pPOK)
PV = 0x1a49834 "fullfile"\0
CUR = 8
Anyway, it blows my hair back :-)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.