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: Q concerning cygwin/perl/network


sargon schrieb am 2001-06-11, 18:11:

> #!/usr/bin/perl
> 
> require Net::Ping;
> 
> $host = '127.0.0.1';

I changed this to:
	($host) = @ARGV;
but only for testing (see below).

> $p = Net::Ping->new();
> 
> if($p->ping($host))
> {
>     print "$host is alive.\n";
> }
> else
> {
>     print "$host is not alive.\n";
> }
> 
> $p->close();
> 

$ ping.pl localhost  
localhost is alive.

$ ping.pl 127.0.0.1
127.0.0.1 is alive.

$ ping.pl 192.168.1.1
192.168.1.1 is alive.

$ perl -V
Summary of my perl5 (revision 5.0 version 7 subversion 17) configuration:
  Platform:
    osname=cygwin, osvers=1.3.2(0.3932), archname=cygwin-multi
    uname='cygwin_nt-4.0 loreley 1.3.2(0.3932) 2001-05-20 23:28 i686 unknown '
    config_args='-de -Dusedevel -Dusemultiplicity'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include',
    optimize='-O2',
    cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3-4 (cygwin special)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld2', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -ldb -lcrypt -liconv -lcygipc
    perllibs=-lcrypt -liconv -lcygipc
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl5_7_1.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Locally applied patches:
        DEVEL10175
  Built under cygwin
  Compiled at May 24 2001 22:05:40
  %ENV:
    PERLIO="stdio"
  @INC:
    /usr/local/lib/perl5/5.7.1/cygwin-multi
    /usr/local/lib/perl5/5.7.1
    /usr/local/lib/perl5/site_perl/5.7.1/cygwin-multi
    /usr/local/lib/perl5/site_perl/5.7.1
    /usr/local/lib/perl5/site_perl
    .



-- 
=^..^=

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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