answersLogoWhite

0


Best Answer

You need to do your own syntax, since PERL was a while ago for me. In short, you can go study the two concepts FIFO and LIFO (FY-fo and LY-fo). These are queue management methods, the first being "first in, first out - FIFO", the second being "last in, first out - LIFO". LIFO is what you want, and there are several ways to do it.

A nice way using elementary data types (which will get you some good practice) is to loop through the input string(s), and store them in an array of strings. Count the loop upwards using a counter in sync with the array index [0 ... x]. When you finish processing all the input strings, write another loop that starts outputting the strings with the high counter value, and decrements by 1 each loop [x down to 0]. Make the counter/index = 0 be your last pass, and exit.

You can build a single string using concatenation and output that, or output a single word each time you loop. To be flexible, you will want to dynamically allocate memory to the array(s), otherwise, if you declare a static Array[100], then the first time you encounter input over 100 words long, your code tanks.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you print out words in reverse in Perl If you put in words one two three it should print three two one?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What compound would work for all three words ball print note?

ball, print and note


Three real words using vers?

Universe university reverse converse


What is the definition of italics print?

It means that the letters are slanted (the upper part is slanted towards the right), as in these three words.


What is 3500000 in words?

If we see 3,500,000 in print, we might say it is three and a half million, or three point five million, or three million five hundred thousand. All three forms are correct.


How do you print with background colour?

when you are at the print screen at the bottom there are two boxes that have the words print background and and print headers and footers click on the box the says print background then click print


I have an idea to paint my bedroom wall and while wet stick newspaper on it and take it off leaving words on the wall How can you print newspaper words on a bedroom wall without being backwords?

The idea is good, but I'm not sure the technique will work. News print ink is such that it will lift fairly easily, but as you pointed out, it is reversed when you remove the paper. You could use your computer to reverse the image, and print it in black and white. You can also adjust your font size while you are at it.


I came before fifty romance None came before five Reverse three And you shall come last Find the magic words?

I love you


What are the compound words for print?

flypapernewspaperpaperbackpaperbarkpaperboardpaperboypaperclippaperweightpaperworksandpaper


Is there such a thing as a reverse dictionary?

Yes. In a reverse dictionary, words are listed according to their meaning.


How can print Telugu words in python language?

To print Telugu words in Python, you can simply use the Unicode representation of the Telugu characters. Here is an example: print("తెలుగు") This will output the Telugu word "తెలుగు" in the console.


Where can I find Manly P. Hall's words to the wise?

This book is in print and any reputable store should be able to order it for you. It is also available from on-line retailers.


What should you do if your best friends ex boyfriend likes you?

Three words: Proceed with caution!