- or download this
#!/usr/bin/perl
use Term::Size;
...
my ($col, $row) = Term::Size::chars *STDIN{IO};
print "$col x $row\n";
- or download this
#!/usr/bin/perl
...
if (open my $cmdh, "$rcmd |") {
print <$cmdh>;
}
- or download this
$ ./699419.pl
120 x 50
$ ./699419.pl </dev/null # doesn't work
x