#!/usr/local/bin/perl -w #left to do: get input from user. Look through ARGV for valid options, #complain if bad options. Look at file extension if type is not #specified. $os is always UNIX, but this could be ported to any #machine that does perl 5.004. So, add support for os, too. #default is binary, but since this is unix-to-unix, then it doesn't #matter. The only problem is for DOS machines, so add support if #port is desired. #read file name from ARGV array. use IO::Socket; $webhost = "www.cs.fiu.edu"; $localhost = `hostname`; $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $webhost, PeerPort => "12345", ); unless ($remote) { die "cannot connect to http daemon on $webhost" } $remote->autoflush(1); print $remote <) ) { print $line; } close $remote;