Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return data to html text box 1

Status
Not open for further replies.

cryptoadm

MIS
Nov 6, 2008
71
US
Code:
			<div style="position:absolute;left:250;top:50;width:750;height:768;"> 
				<table width=750 height=768 border=0 cellpadding=0 cellspacing=0>
					<tr valign="top"> 
						<td bgcolor="#1E1E1E"> 
							<iframe name="I1" height="100%" width="100%" src=""> 
							</iframe>
						</td>
	 				</tr>
				</table>
			</div>

The above gives me a text box on a web page, but how can I display data from a log file on a server back to that text box?

Code:
#!/usr/bin/perl

use IO::Socket;
use IO::Handle;
use IO::Seekable;

my $sock = new IO::Socket::INET (
                                 PeerAddr => 'localhost',
                                 PeerPort => '7183',
                                 Proto => 'tcp',
                                 );
die "Could not create socket: $!\n" unless $sock;

$data_file = "test1.dat";
open(DAT, $data_file) || die "Could not open file: $!\n";
for (;;) {
        while (<DAT>) {
                my $msg = $_;
                chomp $msg;
                print $sock "$msg\n";
                }
        sleep 1;
        DAT->clearerr();
}
close(DAT);
close($sock);

print $sock "$msg\n"; I want returned to the html page inside the text box.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top