use Net::SSLeay::Handle; use Tk; my $mw = tkinit; my $txt = $mw->Scrolled('Text', -width,50,-height,20, -scrollbars, 'osoe')->pack(-fill,'both',-expand,1); $mw->Button(-text,'Run',-command, \&send)->pack; MainLoop; sub send { tie (*SSL, "Net::SSLeay::Handle", "www.openssl.org", "443") or die "error in tie\n"; if(\*SSL){ print SSL "GET http://index.html \r\n"; } while(my $buf = ){ $txt->insert('end',$buf); } }