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
You want to read command-line arguements with perl. How would you do that?
How to copy a file in perl?
What does localtime() do in perl?
How to concatenate strings in perl?
When do you use perl programming?
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
You want to print the contents of an entire array. How would you do that?
Does Perl have reference type?
What are the functions that can be performed using cgi program?
Explain returning values from subroutines?
Is perl a case sensitive language?
what is the difference between java and cgi?
Explain goto label?
What are the steps involved when the cgi program starts running?
What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?