[jdp] - An 8 line server. Serves text files out of the current directory. ====== proc s {c a p} { set o [lindex [split [gets $c] " "] 1] puts $c [read [set f [open ".$o"]]] close $f close $c } set s [socket -server s 3210] vwait forever ====== ---- [jdp] - After discussion in the chatroom, either (but not both) of the following lines can replace the body of proc s: ====== [puts $c [read [set f [open .[string map {. ""} [lindex [split [gets $c] " "] 1]]]]][close $f]][close $c] puts $c [read [set f [open .[string map {. ""} [lindex [split [gets $c] " "] 1]]]]][close $f];[close $c] ====== ---- !!!!!! %| enter categories here |% !!!!!!