I've gone with hdb's suggestion in the other node with the nested foreach loops but I simplified the hash definition to
$haystack{"$a, $b, $c"} = \@zeros;I reversed the hash after reading that in perl, hashes are optimized for searching the keys, so now the \@zeros are the keys. But they're arrays, at least in my head. I'm used to thinking in terms of vectors, sets of ordered pairs, etc & not strings or whatever.
I'm interested in the keys that only contain integers so the "something" I was thinking of using a regex like this
/ (.*\.0000.*)|(.*\.9999.*) /because that would find floats with the right form. It's just I'm not sure what to put in the grep to make sure I'm getting only @zeros that have ALL integers inside & not just at least one. I wouldn't hve thought to use more than one grep like Don Coyote though. Maybe I need to learn more about grep... & then after finding a slice with the right keys, print out the corresponding values. But it's the grep part that I'm stuck on.
In reply to Re^2: question about what to grep(?)
by crunch_this!
in thread question about what to grep(?)
by crunch_this!
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |