in reply to Foreach syntax

This is untested, but it should work:
my @used = grep( %is_available{ $_ } ) keys( %is_available ); for my $p9 ( @used ) { # use $is_available{ $p9 };

Revised: FunkyMonk and blazar both believe I'm farblondzhet, so I do apologize and strike my response...

Replies are listed 'Best First'.
Re^2: Foreach syntax
by blazar (Canon) on Jul 26, 2008 at 08:08 UTC
    This is untested, but it should work:

    I personally believe that you should test it then, since (we're not under Perl 6 yet and) the %is_available{ $_ } form of subscripting/slicing doesn't exist! Incidentally, I wish it did, but... for something completely different!

    --
    If you can't understand the incipit, then please check the IPB Campaign.