$ perl test
syntax error at test line 15, near "+)"
Execution of test aborted due to compilation errors.
####
use Socket;
use strict;
use warnings;
my %stat;
my @addr = qw(10.0.0.1
10.0.0.2
10.0.0.3
192.168.1.5
192.168.1.6
192.168.10.3
192.168.10.4
192.168.10.5);
$stat{inet_ntoa(substr(inet_aton($_), 0, 3) . "\0")} ++ foreach (@addr+);
print "$_ has $stat{$_} nodes\n" foreach (keys %stat);
####
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_64_BIT_INT USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under cygwin
Compiled at Aug 29 2003 12:06:59
%ENV:
CYGWIN=""
@INC:
/usr/lib/perl5/5.8.0/cygwin-multi-64int
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
.