IT戦記

プログラミング、起業などについて書いているプログラマーのブログです😚

STDIN が tty かどうかの確認

-t STDIN
$ perl -e "print -t STDIN\n"
1
$ perl -e "print -t STDIN\n" < hoge.txt

$