The method
sub search()
has an explicit
return undef;
in it which can cause problems when used in list context, e.g. as
suggested by the documentation:
my @recent = $imap->recent()
With that checks like
if (@recent)
of
scalar(@recent) > 0
won't work.