# execute first sub which takes in 1 arg and returns 2 hash references.
my ($hash_ref1, $hash_ref2) = first($arquivo);
# pass those hash refs to the second sub, which returns adjusted versions
($hash_ref1, $hash_ref2) = second($hash_ref1, $hash_ref2);
# pass those adjusted versions to the 3rd sub
third($hash_ref1, $hash_ref2);
#######################################
sub first {
....
....
return \%qual, \%seq;
}
sub second {
my ($first_hash_ref, $second_hash_ref) = @_;
# process/adjust the hashes as needed
....
....
# return the adjusted hashes
return $first_hash_ref, $second_hash_ref;
}
sub third {
my ($first_hash_ref, $second_hash_ref) = @_;
# process the hashes as needed
....
....
}