selectを使用してシステム関数のstdoutを変更しようとしています。しかし、それは機能していないようです。システム出力は、ファイルにリダイレクトされるのではなく、コンソールに表示されます。
use strict;
use warnings;
chdir "C:\\Documents and Settings\\" or die "cannot open the dir\n";
open FH, ">out.txt" or die "cannot open out.txt\n";
select FH or die " cannot change the stdout\n";
system "dir /a" ;
できますがsystem "dir /a > out.txt"
、上記のコードが機能しない理由を知りたいです。