bluethundr has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; my $workdir=~/txt; open BAD-IPS, "< $workdir/bad-ips" or die " Couldn't open file: $!"; my $i = 1; while (my $line = <BAD-IPS>) { chomp $line; print "add ns simpleacl bp-search-spammer$i DENY -srcIP $line -T +TL 43200"; print "hello thar!\n"; # debug line also prints nothing } close BAD-IPS;
[bluethundr@lcent5-1:~/perl] $:./bad_ips.pl [bluethundr@lcent5-1:~/perl] $:
123.45.67.2 123.45.67.3 123.45.67.4 123.45.67.5 123.45.67.6
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: script outputs nothing/nada
by toolic (Bishop) on Jun 06, 2010 at 03:38 UTC | |
by bluethundr (Pilgrim) on Jun 06, 2010 at 19:23 UTC | |
by FunkyMonk (Bishop) on Jun 06, 2010 at 21:40 UTC | |
by bluethundr (Pilgrim) on Jun 06, 2010 at 23:42 UTC |