my $cypher; foreach (qw( Crypt::Twofish Crypt::Twofish_PP )) { my $mod = $_; my $file = $_; $file =~ s{::}{/}g; $file .= '.pm'; if (eval { require $file }) { $cypher = $mod; last; } } die("No acceptable encryption algorithm found. Aborting") if not defined $cypher;