From edeb612f557063c4855dfd9285c6eba29b5d6906 Mon Sep 17 00:00:00 2001 From: "Michael J. Chudobiak" Date: Wed, 23 Jan 2013 15:16:46 -0500 Subject: added autochomp --- libvxi11client/perlbits/Client.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm index 9405464..605d864 100644 --- a/libvxi11client/perlbits/Client.pm +++ b/libvxi11client/perlbits/Client.pm @@ -62,9 +62,17 @@ sub vxi_read { waitlock => 0, termchrset => 0, termchr => 0, + autochomp => 1, @_ ); - return vxi_read_long($self, $args{bufferlen}, $args{waitlock}, $args{termchrset},$args{termchr}); + + my ($bytes, $string, $reason) = vxi_read_long($self, $args{bufferlen}, $args{waitlock}, $args{termchrset},$args{termchr}); + + if ($args{autochomp}) { + chomp ($string); + } + + return ($bytes, $string, $reason); } 1; -- cgit