in reply to scraping screens from a tn3270 terminal

I think you will find most of what you want in IPC::Open2 or IPC::Open3, and perlipc.

Personally, I prefer working with terminal emulators that implement the HLLAPI, like IBMs Personal Communications, which has a great OLE interface. But if you're not on Windows, that may not be an option.

  • Comment on Re: scraping screens from a tn3270 terminal

Replies are listed 'Best First'.
Re^2: scraping screens from a tn3270 terminal
by TheSavoy (Initiate) on Nov 07, 2009 at 22:05 UTC
    Yeah, I read that using the IBM Personal Communications package was a big win, using Win32::OLE ( i think from one of your old posts ;). Problem is, i'd like to stay in the open source world if at all possible, since that package is kinda costly. Here's what i did with IPC::Run (aand some example code found here
    #!/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