![]() |
Sockets
Hey guys its me again. Sorry if I am getting annoying with all the post i did but I need help.So I started to practice with sockets so i made a script that opens a port and listens on it.
:
#!C:/PERL/BIN/perl.exe -wand it gives me this error: :
Name "main::newsock" used only once: possible typo at C:\DOCUME~1\User\MYDOCU~1\PERLPR~1\Sockets\Socket~1.PL line 11. |
you left the $ off of newsock in your while test .... also ... you can leave off the defined() call ... it mucks up the input anyway ...
:
while (<$newsock>) { |
thanks alot syk
|
is there a way to print the output of what the server will print. Like lets say i got this code
:
use IO::Socket;So is there a way to print on my screen what the www.host.com will print on his like Unrecongnized commnad or just a plain window or Premission Denied. |
Sure, just put
:
while (<$socket>) { |
| All times are GMT -5. The time now is 2:26 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC