How do you create a Perl Program that asks a user to enter two numbers and assign those numbers to selections in a text and then reverse the text? I think I am supposed to use splice array and the reverse function but it is not coming out properly.
print "Enter a number:\n";
print "Enter another number:\n";
@array=(Yellow Green Brown Pink Black);
print"The corresponding number and color)
I am supposed to do an inversion by asking the user to enter a two numbers and then invert the words in between them. i.e. If I choose 1 and then 4 I should get Pink, Brown, Green, Yellow.