print Dumper $imap->folders(); $folder="INBOX"; if($imap->selectable($folder)){ print "Ich schnapp mir die inbox\n"; $imap->select($folder) or die "Could not select: $@\n"; }