in reply to Will Perl 6 abbreviate this indirection for me?

I wish people would actually read the Camel book and not just use it as a reference. Perl5 has been doing what you want for years. Remember - the hard things are simple. Most things aren't impossible ...
while (my ($k, $v) = each %$href) { StripLTSpace($v); $v or return DIRTY $row, "ERROR: required field $k not present"; }

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re2: Will Perl 6 abbreviate this indirection for me?
by bbfu (Curate) on Sep 08, 2003 at 21:13 UTC

    I don't think that actually does what princepawn wants, as he's iterating over an independant list (@required_fields) that may or may not contain all of the keys in %$href.

    bbfu
    Black flowers blossom
    Fearless on my breath