in reply to Re^4: Loop problem: jumps one record
in thread Loop problem: jumps one record

What is difference between the 2 #adding to database sections, are they updating different tables ?

poj

Replies are listed 'Best First'.
Re^6: Loop problem: jumps one record
by math&ing001 (Novice) on Jan 31, 2017 at 13:09 UTC
    poj,
    same table but with different criteria.

      Ok, since you didn't detail the criteria you need to adapt this as required

      #!perl use warnings; use strict; my $criteria; while (<>) { next unless /\S/; # skip blank lines if (/(Relay access denied|blocked using)/){ $criteria = $1; next; } if (/\d+\s+(\S+)/ && defined $criteria){ print "update db $criteria = $1\n"; } else { $criteria = undef; } }
      poj