$VAR1 = { #Variable is a hashRef 'table' => [ #One key is "table", # which gives an arrayref. [ #The first element in that array #is another arrayref 'CredSMB.168', #Element 0 # AKA $VAR1->{table}[0][0]; '168', '1', 'Customer.1', #Element 3 '', 'BNS-NA-CA-SMB-SCGLOBAL', '3', 'SCGLOBAL', 'ip360scglobal' ] ], 'columns' => [ #Another key is "columns", #which gives an arrayref. 'REFERENCE', # array element [0] 'id', 'type', 'customer', 'notes', 'name', 'authAlgorithm', 'domain', 'userName' ] };

You might want to consider a simpler rearrangement:
Have a hash where the keys are what is currently in 'columns' and the values are what is currently in 'table'.
$rowHash->{id} = 168; for example.
Depending on how you want to use them, you could make an array of such hashes, or a hash of those hashes (with the keys being some unique combination of data, such as the ID).

By having just a hash of hashes, you can manipulate the "table rows" much easier.

$rowHash = {id=>168, name=>'Jack'}; # create row $tableHash->{$rowHash->{id}} = $rowHash; # add row to table delete $tableHash->{$rowHash->{id}}; # delete row from table $tableHash->{168}{name} = 'Jill'; #update single value


In reply to Re: help me interpret Dumper output. by SuicideJunkie
in thread help me interpret Dumper output. by rbaldwin

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.