X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8c7e44938a661e035f62840e1e177353240ace5d..ca12e8dfc4773aabc13818a0398e06e44028e2bc:/SL/MoreCommon.pm?ds=inline diff --git a/SL/MoreCommon.pm b/SL/MoreCommon.pm index 32ca6b6c0..e4e13e85d 100644 --- a/SL/MoreCommon.pm +++ b/SL/MoreCommon.pm @@ -3,7 +3,7 @@ package SL::MoreCommon; require Exporter; @ISA = qw(Exporter); -@EXPORT = qw(save_form restore_form compare_numbers); +@EXPORT = qw(save_form restore_form compare_numbers any); use YAML; @@ -76,5 +76,13 @@ sub compare_numbers { return $a <=> $b; } +sub any (&@) { + my $f = shift; + return if ! @_; + for (@_) { + return 1 if $f->(); + } + return 0; +} 1;