about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1999-09-18 16:07:15 +0000
committerGraham Barr <gbarr@pobox.com>1999-09-18 16:07:15 +0000
commit140741a7fc1fd5af21bb93b060fcfd277f663035 (patch)
tree5f90992e4183314da8c931b872953b0315719e98
parent024907cb1aa3d69165e59f9f0bdb5e8c509c44e6 (diff)
downloadperl-libnet-140741a7fc1fd5af21bb93b060fcfd277f663035.tar.gz
Net::Cmd
- Map \n's in commands to " "

-rw-r--r--Net/Cmd.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Net/Cmd.pm b/Net/Cmd.pm
index 7b6bc94..ba71d75 100644
--- a/Net/Cmd.pm
+++ b/Net/Cmd.pm
@@ -13,7 +13,7 @@ use strict;
 use vars qw(@ISA @EXPORT $VERSION);
 use Carp;
 
-$VERSION = "2.14";
+$VERSION = "2.15";
 @ISA     = qw(Exporter);
 @EXPORT  = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
 
@@ -168,7 +168,7 @@ sub command
   {
    local $SIG{PIPE} = 'IGNORE';
 
-   my $str =  join(" ",@_) . "\015\012";
+   my $str =  join(" ", map { tr/\n/ /; $_; } @_) . "\015\012";
    my $len = length $str;
    my $swlen;