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]

Re: Re:perl and cygwin


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@ebizmalay.com
eBizMalay.Com @ http://www.ebizmalay.com
Bringing To You eBiz Solutions Of Tomorrow

----- Original Message -----
From: "Jorge Goncalvez" <goncal11@col.bsf.alcatel.fr>
To: <cygwin@sources.redhat.com>
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/


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