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 print the entire contents of an array with Perl?
Comment on the scope of variables in perl.
What are perl variables?
Write a script to reverse a string without using perl's built in functions?
How can the user execute a long command repeatedly without typing it again and again?
How does polymorphism work in perl?
How can you create anonymous subroutines?
How to remove a directory in perl?
What are the advantages and disadvantages of perl language?
What is the difference between localtime() and gmtime() functions?
What are the various flags/arguments that can be used while executing a perl program?
Does Perl have objects? If yes, then does it force you to use objects? If no, then why?
How to deleting an existing file in perl programming?
What is the purpose of goto expr statement?
What are the functions that can be performed using cgi program?