Personally I would use the option specification that requires an argument, opt=s (instead of leaving it optional, opt:s, as rot earlier). If the option value would be -, then would switch to reading from standard input unconditionally (without using -p function). That special value of opt would be mentioned in the POD.
In reply to Re^3: checking for piped input data
by parv
in thread checking for piped input data
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |