in reply to Re: scraping screens from a tn3270 terminal
in thread scraping screens from a tn3270 terminal
#!/usr/bin/perl my @s3270 = s3270; use IPC::Run qw( start pump finish timeout ); $IPCRUNDEBUG=details; # Incrementally read from / write to scalars. # $in is drained as it is fed to cat's stdin, # $out accumulates cat's stdout # $err accumulates cat's stderr # $h is for "harness". my $h = start \@s3270, \$in, \$out, \$err, timeout( 10 ); $in .= "connect(L:ssl3270.myhost.org:2023)\n"; $in .= "ascii\n"; $in .= "quit"; finish $h or die "s3270 returned $?"; warn $err if $err; print $out; ## All of s3270's output
|
|---|