# read what comes back down the socket my $file = "/tmp/dump.txt"; open(FH,">>$file"); open(SOCK,"<$sock"); while(){ print FH; } close FH;