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 / venkatesh

#!/usr/bin/perl
$a = "Venky";
@c;
@b = split("", $a);
foreach $char (@b){
unshift(@c, $char);
}
$value = join("", @c);
print "$value\n";

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I print the entire contents of an array with Perl?

937


Comment on the scope of variables in perl.

918


What are perl variables?

915


Write a script to reverse a string without using perl's built in functions?

971


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

923


How does polymorphism work in perl?

908


How can you create anonymous subroutines?

905


How to remove a directory in perl?

980


What are the advantages and disadvantages of perl language?

912


What is the difference between localtime() and gmtime() functions?

1034


What are the various flags/arguments that can be used while executing a perl program?

875


Does Perl have objects? If yes, then does it force you to use objects? If no, then why?

942


How to deleting an existing file in perl programming?

896


What is the purpose of goto expr statement?

905


What are the functions that can be performed using cgi program?

919