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?

[Webinar] Streamline your web hosting managementRegister Today

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
All Courses

From novice to tech pro — start learning today.