my @storage = qw(knife wand bow); my @inventory = qw( axe sword shovel ); sub depo { sleep (1); print "Which item would you like to deposit?\n", "1. Nevermind\n"; foreach my $inv (map(ucfirst, @inventory)){ print "$num. $inv\n"; $num++; } $choice = lc(); chomp $choice; if ($choice =~ $item) { my $item = splice @inventory, $choice; push(@storage,$item); print "You have stored a \"$item\".\n"; } #### else { print "Please input a valid answer!\n"; sleep (1); &bank; }