in reply to Removing element of an array

The easiest was to prevent output of the offending line you be to put a conditional on your output. Perhaps changing print FH1 "$account\n"; to
if ($account !~ /.{21}40[68]/) { print FH1 "$account\n"; }

There are a number of stylistic critiques I could give if you like. I would in particular point out you are using prototypes incorrectly - see Prototypes in perlsub.

Replies are listed 'Best First'.
Re^2: Removing element of an array
by cesear (Novice) on Apr 14, 2011 at 16:07 UTC
    Hey thanks that regex works great!