Why don't you provide an option to read from STDIN and if that option isn't specified read from the IMAP server?
See Getopt::Long
In reply to Re: Piping input as an option
by Joost
in thread Piping input as an option
by jkelly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |