in reply to Can Perl copy informations from screen in CMD?

Maybe the backticks (`...`) or the qx() operator does what you want?

use strict; my $info = `systeminfo`; print "I got the following information:\n"; print "***$info***\n";

Replies are listed 'Best First'.
Re^2: Can Perl copy informations from screen in CMD?
by cdarke (Prior) on Mar 18, 2007 at 22:51 UTC
    Or even:
    use strict; open (my $info, '>', 'info.txt') or die "info.txt: $!"; print $info qx(systeminfo); close($info)
    You can read the screen with Win32::Console->ReadChar but you really don't want to.