in reply to Auto Fill

Taking the parts of your guidance request in reverse order:

"to get the desired output I am looking for"

Is printing a simple "E" or "L" your "desired output?" If so, do you nonetheless think the second snippet is somehow deficient? If so, how?

"I just need to be guided on to where to put the code.... "

Probably it would be best to put the second snippet into the first, after the input from <STDIN> for $cmmdty has run its course.

But what's the point of the second input routine? What is expected when asking user to enter a $lore? Does a $lore have to do with your question?

And at least as much to the point, how much thought did you put into solving your (trivial) question before posting? Why did you bother posting instead of trying your possibilities... or reading the applicable tuts?

Paraphrasing numerous suggestions found in the FAQs and elsewhere here in the Monastery, we really do like to see some genuine effort. That fact that you posted some code hardly obscures the fact that there's very little sign you made any serious effort to answer your actual question.

If I've misconstrued your question or the logic needed to answer it, I offer my apologies to all those electrons which were inconvenienced by the creation of this post.

Replies are listed 'Best First'.
Re^2: Auto Fill
by PilotinControl (Pilgrim) on May 15, 2015 at 20:30 UTC

    The code provided is what is currently being used...manually entering in if the truck is loaded or empty...for example: a screen pops up asking what the commodity is say Scrap: then the next screen would automatically be filled with L for being loaded. If the Commodity screen pops up and NONE: is typed then the next screen would automatically show E for being empty.