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
What is the importance of perl warnings?
What are the features of perl language?
What are scalar data and scalar variables?
What is grep used for in perl?
What does this symbol mean '->'?
How to do comment in perl?
In CPAN module, name an instance you use.
What is posix in perl?
What are perl array functions?
How to concatenate strings in perl?
You want to concatenate strings with perl. How would you do that?
How do I do fill_in_the_blank for each file in a directory?
What are the logical operators used for small scale operations? Explain them briefly.
What is boolean context?
What is the closure in PERL?