Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a script to reverse a string without using Perl's
built in function

Answer Posted / arukumar g m

my $string="hello";
my $str;
my $i = length($string);
while($i>0) {
my $nthstr = substr($string, $i-1, 1);
$str.=$nthstr;
$i = $i-1;
}
print $str;

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the importance of perl warnings? How do you turn them on?

1094


What does undef function in perl?

998


How many ways can we express string in Perl?

1013


How we can navigate the xml documents?

1062


What are the features of perl language?

1141


How to add elements in a hash in perl?

967


Why -w argument is used with perl programs?

1025


What is the use of now constructor in perl?

1016


What are arrays in perl?

1014


How can you use Perl warnings and what is the importance to use them?

1024


Explain the internal working of cgi

969


How many types of variable in perl?

1127


What does the qq{ } operator do?

1007


Explain the meaning of closure in perl.

1091


What does `$result = f() .. g()' really return?

1291