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 / uma from sswdept - hov service

$strin = "uma";
print "\n \$strin <$strin>";

$len = length($strin);
@arr = split(//,$strin);
print "\n \$len $len \@arr <@arr>";

for($i=$len-1;$i>=0;$i--)
{
print $arr[$i];
$retVal .= join(//,$arr[$i]);
print "\n retVal <$retVal> ";
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find the length of an array in perl?

1028


What does localtime() do in perl?

1013


What are different data types that perl supports. Elaborate on them.

1092


In CPAN module, name an instance you use.

967


What is a chomp() function in perl?

1054


List all the features of perl programming?

907


List the files in current directory sorted by size ?

991


Explain lexical variables.

957


What's the difference between /^Foo/s and /^Foo/?

1193


What package you use to create a windows services?

894


Mention what is cpan?

1024


How to add elements in a hash in perl?

933


Why does Perl not have overloaded functions?

1042


Mention how many ways you can express string in Perl?

1024


What can be done for efficient parameter passing in perl? Explain.

1048