Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day stmadalli, Welcome to the monastery.
I suspect what you want is something like this:
There are a number of syntactical problems with the code you posted. Compare it with this example:
[Note how I've used qw{...} to eliminate much of the original punctuation so that the data is not lost amongst a forest of quotation marks (see perlop: Quote and Quote-like Operators). Also note the fat comma, =>, quotes its left operand so that's several more quotes that aren't needed (see perlop: Comma Operator).] Output:
I don't think these are what you meant, but be aware of the built-in functions keys and values. Also look at the first function provided by the built-in module List::Util. This can save you checking all elements of an array (with grep) when you only want to know if any element meets your condition (i.e. it stops checking as soon as the first TRUE condition is found). -- Ken In reply to Re: Check if keys of hash is values of another hash!
by kcott
|
|