This is what I think Question 1 could be.. I have no idea to be honest.
sub CheckJumpDestination {
my($jump_destination) = @_;
if (exists($jump_destination)) {
print STDOUT "Jump destination $jump_destination has already been received.\n";
}
else {
# Your code here.
}
}