Help for this page

Select Code to Download


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