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 perl language?

924


What are the purpose of close(), getc() and read() functions?

872


what are the strategies followed for multiple form interaction in cgi programs?

934


Which functions in Perl allows you to include a module file or a module and what is the difference between them?

996


What are the advantages of perl programming?

990


In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?

899


Explain the meaning of subroutine?

964


How can the user execute a long command repeatedly without typing it again and again?

925


Explain perl. What are the advantages of programming in perl?

1032


How to read a single line from a file in perl?

959


How many data types are there in perl?

952


What does undef function in perl?

936


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

974


What are the different types of perl operators?

1063


Which has highest precedence in between list and terms? Explain?

861