This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE:What's wrong with this?


Hi, i have this perl script but it seems returning always 0

use IO::Socket;
$port=21;


$sock = IO::Socket::INET->new(PeerAddr  =>'localhost',
                                        PeerPort => $port,
                                        Proto => 'tcp') ;
die &inetdconf unless ($sock);


my $cmd4=" net stop inetd && net start inetd";
system($cmd4);

sub inetdconf()
{
	my $cmd=" c:\\oxe\\cygwin\\bin\\sed.exe 's/^\#ftp/ftp/' 
c:\\cygwin\\usr\\local\\etc\\inetd.conf > c:\\cygwin\\usr\\local\\etc\\inetd.new 
";# Comment out ftp entry in /etc/inetd.conf
	system($cmd);
	my $cmd2=" c:\\oxe\\cygwin\\bin\\mv.exe 
c:\\cygwin\\usr\\local\\etc\\inetd.new c:\\cygwin\\usr\\local\\etc\\inetd.conf"; 
# Move new file into place
	system($cmd2);

}

thanks.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]