in reply to Re^5: Interact with mainframe screen
in thread Interact with mainframe screen

I realize that I have a ton to learn about object oriented programming. My only perl experience has been a more linear use of the language where I read and modify/create text files. Below is the code that you posted on reading the screen. Line two is the line that concerns me....

my ($self) = @_;

Thanks again for your patience.

sub screen { my ($self) = @_; my ($cols,$rows) = ($self->cols,$self->rows); my ($line) = $self->eclps->GetTextRect(1,1,$rows,$cols); my @lines; while ( $line =~ s/(^.{1,$cols})//sm) { push @lines, $1; }; s!\0! !g for @lines; # Mark fields as dirty $self->log("Fields marked dirty"); $self->{fields} = undef; push @lines, $line if $line; @lines; };

Replies are listed 'Best First'.
Re^7: Interact with mainframe screen
by Corion (Patriarch) on Jun 13, 2007 at 14:59 UTC

    The ->screen subroutine is to be called like this:

    my $host = Host::PCom->new($hostname); my @lines = $host->screen();