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 / vipul dalwala

#!/usr/bin/perl

my $str = "hello";
$revstr = "";

while($str =~ /(.)/g)
{
$revstr = $1.$revstr;
}

print $revstr."\n";

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a chomp() function in perl?

956


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2401


How can information be put into hashes?

912


What are the advantages of perl programming?

941


How do you give functions private variables that retain their values between calls?

895


What is use of ‘->’ symbol?

946


What is lexical variable in perl?

871


What package you use to create a windows services?

830


Explain perl. When do you use perl for programming? What are the advantages of programming in perl?

824


What is a perl references?

860


How do I sort a hash by the hash key?

871


How to compare two strings in perl?

887


How to read a directory in perl?

955


Difference between the variables in which chomp function work ?

1008


What are the different string manipulation operators in perl?

864