2007-05-20から1日間の記事一覧
プログラムが対話的に実行されているかどうかで処理を分けるにはIO::Interactiveを使うと非常に楽です。 use IO::Interactive qw(is_interactive); if (is_interactive) { print {*STDOUT} q{Now, interactive}; # negotiate with human } % perl -MIO::Inte…
プログラムが対話的に実行されているかどうかで処理を分けるにはIO::Interactiveを使うと非常に楽です。 use IO::Interactive qw(is_interactive); if (is_interactive) { print {*STDOUT} q{Now, interactive}; # negotiate with human } % perl -MIO::Inte…