Help for this page
print {$fh{5}} "to be printed\n";
my %dispatch: sub create_function { ... # ... # later when reading the file, assuming you have obtained a $line and +an id $id from the input: $dispatch{id}->($line);