without posting more example code its hard to give a complete answer, but when you call your sub from the hash, why not pass it the lock value?
my $num = ... # get lock number;
$users_menu{"n"}[1]->($num)
# calls "new_user" passing it $num
question edited:
sub menu_prompt {
my $options = shift;
print_options $options;
my $choice = <>; # i assume the diamond operator got stripped
chomp $choice; # second my is in error
if (defined $$options{$choice}) {
return $$options{$choice}[1](@_);
# any additional arguments to menu_prompt will be passed to the sub
# return the value for future processing
}
}
Eric Strom
2009-12-12 02:30:08