You're right. I suggest something like this for client side:
and something like this for server:print $sock "$file\0";
{ local $/ = "\0"; $file1 = <$conn>; chomp $file1; }
"\n" isn't portable. And at least on *nix file name may contain "\n"
In reply to Re^3: FIle transfer using sockets
by zwon
in thread FIle transfer using sockets
by ashok13123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |