in reply to Sparing multiple 'or's

Creative code reuse AKA cheating (#5 and #6):

#!/usr/bin/env perl use strict; use warnings; use English; use feature qw(say); sub any (&@); my $item = 'ABA'; my @items = qw(ABA SCO ACC PHC GHF); if ( any { $ARG eq $item } @items ) { say q(Cool!); } else { say q(Crap!); } sub any (&@) { my $f = shift; foreach (@_) { return 1 if $f->(); } return 0; } __END__

See also

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help