Write a script to reverse a string without using Perl's
built in function
Answer Posted / venkatesh
#!/usr/bin/perl
$a = "Venky";
@c;
@b = split("", $a);
foreach $char (@b){
unshift(@c, $char);
}
$value = join("", @c);
print "$value\n";
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do I pass a command line argument in perl?
Create a function that is only available inside the scope where it is defined ?
What does perl do in linux?
What are the benefits of perl in using it as a web-based application?
How to replace perl array elements?
You want to print the contents of an entire array. How would you do that?
Write a cgi program to show the header part?
Can inheritance be used in perl? Explain with the help of an example.
What are perl strings?
What is perl push array function?
Why we use CGI?
List all the features of perl programming?
What does the qq{ } operator do?
What is the use of command “use strict”?
What is subroutine in perl?