perlcall.pod SAVETMPS/FREETMPS bracket
[p5sagit/p5-mst-13.2.git] / lib / chat2.pl
index 8320270..094d3df 100644 (file)
@@ -264,7 +264,7 @@ ESQ
                eval $cases; die "$cases:\n$@" if $@;
        }
        $eof = $timeout = 0;
-       &$subname();
+       do $subname();
 }
 
 ## &chat'print([$handle,] @data)
@@ -275,7 +275,9 @@ sub print { ## public
        if ($_[0] =~ /$nextpat/) {
                *S = shift;
        }
-       print S @_;
+
+       local $out = join $, , @_;
+       syswrite(S, $out, length $out);
        if( $chat'debug ){
                print STDERR "printed:";
                print STDERR @_;