Thread in_array() - Funktion bauen
(25 answers)
Opened by Gast at 2005-10-13 15:58
[quote=phaylon,13.10.2005, 14:35]Dann eben Perl6::Junction, das sollte kurzschließen.[/quote]
use List::Util qw(first); my $enthalten = defined first { $_ eq $search } @array; List::Util ist mittlerweile standard. edit: defined statt () =\n\n <!--EDIT|pq|1129232912--> Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: ![]() ![]() |