use strict; use warnings; my %hash; my @sets = qw(set_a set_b); foreach my $set ( @sets ) { &find_start($set); #defines start and end points to grab data &fill_hash(); # fill 'er up &print_hash(); #print out &clean_hash(); #clean it out }