in reply to Re^2: grepping the location of a value from a datastructure
in thread grepping the location of a value from a datastructure

Then you should probably invert your data structure. Instead of

my $hash = { base => { key => 'value', key2 => 'value2'}};

consider

my $hash = { "value" => [ { 'chapter' => 2, 'paragraph' => 10 }, { 'chapter' => 2, 'paragraph' => 11 }, ... ], "value2" => [ { 'chapter' => 3, 'paragraph' => 1 } ] };
-derby

Replies are listed 'Best First'.
Re^4: grepping the location of a value from a datastructure
by rastoboy (Monk) on Aug 07, 2013 at 18:57 UTC
    You are a f*cking genius. LMAO.

    Of course, that would work perfectly!

    Thanks! I'd still be interested if anyone has other clever ideas though, in principle.