if ( /REGION/ ) { if ( /TOTAL/ ) { # Finish with that section } else { # Start with that section } } else { # Regular data line .. handle normally (see below) } #### my %SalesReps = { 7A => \@steve, 7 => \@sue, 8 => \@mike }; #### my $ThisArray = $SalesRep{ $region } #### unshift ( @{ $ThisArray }, $region, $reg_num, @name );