Ok, sorry for the second post.. but i sat the first one to "solved", so i recon im better of with a new post **sorry**.
Still struggeling with perl hashes, and here is the data im trying to extract into a variable i can work with:
$HASH1 = {
dest => { 3656040223 => bless( {
_frame => "\0P\347\211\331\352\277\37I|\$D\200
+\20\0.\0{\0\0\1\1\b\n,\276\217\6\3\250\210\321",
_parent => undef,
acknum => 1232872516,
cksum => 123,
data => '',
dest_port => 59273,
flags => 16,
hlen => 8,
options => "\1\1\b\n,\276\217\6\3\250\210\321",
reserved => 0,
seqnum => 3656040223,
src_port => 80,
urg => 0,
winsize => 46
}, 'NetPacket::TCP' ) },
src => {}
};
This data is from a variable called $test.
I asked the monks before today about an example on how to do this, and that example worked. but when i try the same here, i cant get it to work....
Ive tried
print $test->dest->flags
print $test->dest->[0]->dest_port
And a lot of other variations.
I dont know if i need to use this:
dest => { 3656040223
when i extract the data. And that number changes, so I cant do:
$conn->dest->3656040223->flags
Please help, and be kind on the response :) This is a field im struggeling to get the hang of.
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.