I am trying to do this in Perl

Write a program that takes a string of text, stores it in a control structure and does the following?
i.      Prints it forward
ii.      Prints it backwards
iii.      Prints it without the first element
iv.      Adds a new element to the front and prints
1030071002Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ozoConnect With a Mentor Commented:
print $text;
print scalar reverse $text;
print substr $text,1;
print $text=$new.$test;
0
 
1030071002Author Commented:
did not work
print $text=$new.$test;
0
 
1030071002Author Commented:
$text = "Reynard is the greatest Programmer in the world\n";
print $text;
print "\n";
print scalar reverse $text;
print "\n";
print substr $text,1;
print "\n";
print $text=$new.$test;
0
 
ozoConnect With a Mentor Commented:
$new = "element";
print $text=$new.$text;
0
 
1030071002Author Commented:
Thank you so much mabe you can help me with the others
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.