#!/usr/bin/tclsh
# getquotes.tcl: stock prices for Yahoo, AT&T, Microsoft, Google

set so [socket quote.yahoo.com 80]  ;# connect to server
set q "/d/quotes.csv?s=YHOO+T+MSFT+GOOG&f=sl1d1t1c1ohgv"

puts $so "GET $q HTTP/1.0\n\n"      ;# send request
flush $so

puts [read $so]                     ;# read & print reply
