Hi there.!
Im seeking for your wisdom!
I need to know how i can push this calue $ServiceRef fomr this piece of code to an array of hash of hashes:
elsif (/<ServiceRef>(.+?)<\/ServiceRef>/) {
$serviceref = $1;
$index{"ID$counter"}{"sons"} = [$serviceref];
}
As you see im capturing a regex expresion into $serviceref and i want toload every matches has been found into the array into de hash of hashes $index{"ID$counter"}{"sons"}
[here should be an array reference, isnt ?
].
As i has wrote its seems doesnt running properly, maybe something its mistakes. I need to do that because i need to keep every matched result of the regex expression because "a father could have more than a son".
Thanks in advance!
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.