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

Write a program to decode the data in the form using cgi programming

1047


You want to empty an array. How would you do that?

912


What is the different between array and hash in perl programming?

930


Explain regular expression in perl?

964


How to read a file into a hash array?

1046


How the interpreter is used in Perl?

951


What is use of ‘->’ symbol?

1008


Why Perl aliases are considered to be faster than references?

949


What is hash?

1074


Explain tk?

997


Explain the difference between "my" and "local" variable scope declarations. ?

1068


Explain gmtime() function in perl?

978


How to know whether a key exists or not in perl?

982


Why to use perl scripting?

1007


Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.

893