in reply to Re: Managing Client Specific Hashes
in thread Managing Client Specific Hashes

but the key is important data as well... the key is where the data field begins... and that hashes to how long the field is... can you present a sample array that does what you propose? Thanks if you have time.

Grygonos
  • Comment on Re: Re: Managing Client Specific Hashes

Replies are listed 'Best First'.
Re: Managing Client Specific Hashes
by Abigail-II (Bishop) on Jan 13, 2004 at 19:50 UTC
    my @a = ([ 1, 8], [ 9, 11], [ 20, 2], [ 22, 9], [ 31, 7], [ 38, 8], [ 46, 8], [ 54, 8], [ 62, 30], [ 92, 12], [104, 30]);
    Or if your array is large, and you want to save memory:
    my @b = ( [1, 9, 20, 22, 31, 38, 46, 54, 62, 92, 104], [8, 11, 2, 8, 7, 8, 8, 8, 30, 12, 30] );
    But if you look carefully, the "keys" aren't necessary at all - if all you do is process the data in order, the keys can be calculated from the values, and all you need to keep is:
    my @c = (8, 11, 2, 8, 7, 8, 8, 8, 30, 12, 30);

    Abigail

      an array of array ref's .. ok.. that makes more sense.. I would agree with computing the "keys" only that some data is not used in the file... so the computations could be off somewhere.(haven't looked into it) Thanks for working w/ me on this abigail

      Grygonos