On Jun 13, 2011 at 22:36 UTC, Dave (davido) wrote:
> It doesn't seem like you need the second hash at all.
> You just need the first one arranged differently.
Unfortunately I can't use only a single array. I gave only a simplified example (code) in my question. In fact, I parse the two outputs:
(1) Output log file from Oracle RMAN session, where I've informations about the channels. For example:

allocated channel: ch1 channel ch1: SID=208 device type=DISK allocated channel: ch2 channel ch2: SID=403 device type=DISK channel ch1: specifying datafile(s) in backup set input datafile file number=00014 name=/foo/oradata/bar/foodb-lob01.dbf input datafile file number=00008 name=/foo/oradata/bar/foodb-index11.d +bf (...) channel ch2: specifying datafile(s) in backup set input datafile file number=00004 name=/foo/oradata/bar/tools01.dbf input datafile file number=00019 name=/foo/oradata/bar/foodb-data02.db +f input datafile file number=00003 name=/foo/oradata/bar/undotbs01.dbf

(2) The output from `RMAN> list backup` command, where I've a lot of informations about the backups. For example:

BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 100 Full 509.78M DISK 00:01:03 15-FEB-07 BP Key: 202 Status: AVAILABLE Compressed: YES Tag: DB_FULL +_DAILY_20110613_142608 Piece Name: /VNB_foo_rman/NEW_FOODB_RMAN/2011_06_13/FOODB_DB_F +ULL_DAILY_1_53_1lmepls6_20110613.dbf List of Datafiles in backup set 200 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 14 Full 421946 15-FEB-07 /foo/oradata/bar/foodb-lob01.dbf 19 Full 421946 15-FEB-07 /foo/oradata/bar/foodb-data02.dbf BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 101 Full 509.78M DISK 00:01:03 15-FEB-07 BP Key: 202 Status: AVAILABLE Compressed: YES Tag: DB_FULL +_DAILY_20110613_142608 Piece Name: /VNB_foo_rman/NEW_FOODB_RMAN/2011_06_13/FOODB_DB_F +ULL_DAILY_1_54_1mmepls6_20110613.dbf List of Datafiles in backup set 200 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 4 Full 421946 15-FEB-07 /foo/oradata/bar/tools01.dbf 8 Full 421946 15-FEB-07 /foo/oradata/bar/foodb-index11.dbf 3 Full 421946 15-FEB-07 /foo/oradata/bar/undotbs01.dbf

So, first (1) goes to the "%files_by_channel" array, and second (2) goes to the "%files_by_number" array. But like I said before, this is just a simplified example, because the "%files_by_number" array contains much more information than I showed. It was interesting only for me how to combine information from these two hash arrays.

Scottie


In reply to Re^2: How-To integrate information from two hash tables? by Scottie
in thread How-To integrate information from two hash tables? by Scottie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.