#!/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 = ) { chomp $line; print "add ns simpleacl bp-search-spammer$i DENY -srcIP $line -TTL 43200"; print "hello thar!\n"; # debug line also prints nothing } close BAD-IPS;