http://www.perlmonks.org?node_id=1027527


in reply to Re^4: check parameters
in thread check parameters

You want it to fail if one of them fails, correct? Try this:

if ( scalar( grep { /^$pattern/i } keys %$format ) < scalar( keys %$fo +rmat ) ) { ...