reading from Net::Telnet input string problem
am 16.06.2006 19:17:40 von pauldIm navigating my way round a series of screens using Net::telnet.
I get intermittent errors which are due to the way data is read in, in
blocks
the end of one page is
6 - PMI Details
7 - ACP details
I can recognise this with
$matchtext='ACP';
do {$text=$t2->get;#print $text;
$names.=$text;} until ($text=~m/$matchtext/i);#print $names;
but it fails if 'ACP isnt retrieved in the same block. i tried with
what I think is the end of page string
# $matchtext='22;38'; (cant get the [ escaped )
but i get the same problem
heres an end of a page when it fails
61 72 67 65 1b 5b 31 38 3b 33 38 48 36 20 2d 20 arge.[18;38H6 -
50 4d 49 20 44 65 74 61 69 6c 73 1b 5b 31 39 3b PMI Details.[19;
33 38 48 37 20 2d 20 41 43 50 20 64 65 74 61 69 38H7 - ACP detai
6c 73 1b 5b 32 32 3b 33 37 48 5b 20 5d 1b 5b 32 ls.[22;37H[ ].[2
32 3b 33 38 48 2;38H
using
$t2->waitfor("$matchtext");
generates
missing opening delimiter of match operator in argument "ACP" given to
Net::Telnet::waitfor() at /var/www/localhost/cgi-bin/ituhdupas.pl line
107
ive also tried te matchtext string as passing ASCII but still the same
problem