Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $cmd->dataend()
- if (exists ${*$cmd}{'net_cmd_last_ch'});
- if (scalar(@_)) {
- local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
- my $str = join(
- " ",
- map {
- /\n/
- ? do { my $n = $_; $n =~ tr/\n/ /; $n }
- : $_;
- } @_
- );
- $str = $cmd->toascii($str) if $tr;
- $str .= "\015\012";
- my $len = length $str;
- my $swlen;
- $cmd->close
- unless (defined($swlen = syswrite($cmd, $str, $len)) && $swlen == $len);
- $cmd->debug_print(1, $str)
- if ($cmd->debug);
- ${*$cmd}{'net_cmd_resp'} = []; # the response
- ${*$cmd}{'net_cmd_code'} = "000"; # Made this one up :-)
- }
- $cmd;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement