open(READ, "-|", "someoscommand.exe"); foreach $a () { chomp($a); print "==> $a\n"; } close READ;