print $sock "$file\0"; #### { local $/ = "\0"; $file1 = <$conn>; chomp $file1; }