Write a script to reverse a string without using Perl's
built in function
Answer Posted / pallavi w
#!/usr/bin/perl -w
2
3 use strict;
4 my $string = "STRING";
5 my $rev_string = join "", reverse (split ("", $string));
6
7 print "The String is ". $string ."\n";
8 print "The reverse string is ". $rev_string ."\n";
Is This Answer Correct ? | 4 Yes | 8 No |
Post New Answer View All Answers
what is the function of Return Value?
What is a perl references?
Explain string comparison operators in perl.
In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?
Perl regular expressions are greedy" what does this mean?
What are the benefits of perl in using it as a web-based application?
What is an interpolation in perl?
Why Perl aliases are considered to be faster than references?
What is the difference between die and exit in perl?
What is the importance of perl warnings? How do you turn them on?
How do I debug a perl program?
There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"
What is Perl?
How do you set environment variables in perl?
Which of these is a difference between Perl and C++ ?