Help for this page

Select Code to Download


  1. or download this
    my ($out, $err1, $exit2) = $ssh->cmd("df -k");
    
    ...
        print "$cnt: $line\n";
        $cnt++;
    }
    
  2. or download this
    my $cnt = 1;
    while ($out =~ /\G(.+)\n?|\G\n/g) {
        print "$cnt: $1\n";
        $cnt++;
    }