in reply to IF and some conditions

one more
my %hash = map {$_ => undef} qw(7 5 3); print "ok" if exists $hash{$test};

Replies are listed 'Best First'.
Re^2: IF and some conditions
by mugwumpjism (Hermit) on Jun 03, 2005 at 06:53 UTC

    If you want a set, then use a set.

    use Set::Object; my $set = set(qw(7 5 3)); print "ok" if $set.includes($test);

    This module is called plain "Set" in Perl 6.

    $h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";