Thread Richtige Parameter bei Net::Telnet (13 answers)
Opened by bianca at 2015-10-07 09:07

bianca
 2015-10-08 09:14
#182524 #182524
User since
2009-09-13
6978 Artikel
BenutzerIn

user image
Hab es nochmal optimiert, so sieht das Ergebnis am "saubersten" aus:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
if (my @lines = $t->cmd('export LS_COLORS=none; ls')) {
    foreach my $line (@lines) {
        $line =~ s/[\r\n]//g;
        $line =~ s/\[~\] # //g;
        $line =~ s/\x1B\[0m//g;
        $line =~ s/\x1B\[(\d+);(\d+)m//g;
        next if $line eq '';
        print "Zeile: '$line'\n";
    }
}
10 print "Hallo"
20 goto 10

View full thread Richtige Parameter bei Net::Telnet