Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <003001c1094e$0aa3f1a0$9c41a9cb@ebizmalay> From: "=?iso-8859-1?B?0eN64643OA==?=" To: "Jorge Goncalvez" , References: <200107091515 DOT RAA19201 AT cabs40 DOT col DOT bsf DOT alcatel DOT fr> Subject: Re: Re:perl and cygwin Date: Tue, 10 Jul 2001 22:38:43 +0800 Organization: eBizMalay.Com (EBMC) @ http://www.ebizmalay.com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Oit! What happen to your SHEBANG? Should'nt be "\n#SNIPPET 17:1388". Try using "#!/usr/bin/perl" instead. If possible with a clear "\n" line break after SHEBANG cause I don't know why some versions of perl require this to work, beats me! Thank you. Regards, Ñãzã®78 @ nazar AT ebizmalay DOT com eBizMalay.Com @ http://www.ebizmalay.com Bringing To You eBiz Solutions Of Tomorrow ----- Original Message ----- From: "Jorge Goncalvez" To: Sent: Monday, July 09, 2001 11:15 PM Subject: Re:perl and cygwin > Hi , I have made a perl program but When i start it I have the following error: > Can't locate Sys/Syslog.pm in @INC (@INC contains: D:/Perl/li > .) at renifleur.pl line 7. > Why, Syslog.pm exits althougt. > ---------------------------------------------------------------------------- ---- > > #SNIPPET 17:1388 > #!/usr/bin/perl -w > # renifleur - journalise les tentatives de connexion sur des ports > # particuliers > > use Sys::Syslog; > use Socket; > > # identifie mon port et mon adresse > $nom_socket = getsockname(STDIN) > or die "je n'ai pu m'identifier : $!\n"; > ($port, $adr_ip) = sockaddr_in($nom_socket); > $mon_adresse = inet_ntoa($adr_ip); > > # trouve un nom pour le service > $service = (getservbyport ($port, "tcp"))[0] || $port; > # et identifie maintenant l'adresse distante > $nom_socket = getpeername(STDIN) > or die "je n'ai pu identifier l'autre extrémité : $!\n"; > ($port, $adr_ip) = sockaddr_in($nom_socket); > $son_adresse = inet_ntoa($adr_ip); > > # et journalise l'information > openlog("renifleur", "ndelay", "daemon"); > syslog("notice", "Connection from %s to %s:%s\n", $son_adresse, > $mon_adresse, $service); > closelog(); > exit; > > ---------------------------------------------------------------------------- ---- > -- > 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/ -- 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/