X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/602a4d98939e03b3533f5b6de426ee7f719cf2e1..4f82ce002979fbe9a59d5e69a53e3697b7df20c1:/SL/MoreCommon.pm?ds=sidebyside 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;