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

You want to print the contents of an entire array. How would you do that?

916


Can we load binary extension dynamically?

905


Explain use of ‘my’ keyword in perl?

905


How will you create a file in perl?

945


What is the purpose of _package_ literal?

976


Perl uses single or double quotes to surround a zero or more characters. Are the single(' ') or double quotes (" ") identical?

896


What are arrays in perl?

935


Show the use of sockets for the server and client side of a conversation?

845


How to access parameters passed to a subroutine in perl?

924


What does next statement do in perl?

950


Write a program to concatenate the $firststring and $secondstring and result of these strings should be separated by a single space.

1021


Explain the various characteristics of perl.

915


What does read () command do?

891


Mention the difference between die and exit in Perl?

1068


What is the closure in PERL?

974