sub tear_down{ my ($dataFile) = @_; open my $file, '<', $dataFile || die "$!"; my count = 3; for ( my $i = 1 ; $i <= $count ; $i++ ) { seek to bytes in file; read x bytes into $data ; parse_file_1($data) ###### but how would i loop so first $data goes to parse_file_1, second $data would go to parse_file_2 ect? ###### would i have to send it to another sub that could count each one? and if count = 1 send to parse_file_1 ###### and if count=2 then send to parse_file_2 ect ect? cz nested loops give me unexpected results alot of times } }