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 / pallavi w

#!/usr/bin/perl -w
2
3 use strict;
4 my $string = "STRING";
5 my $rev_string = join "", reverse (split ("", $string));
6
7 print "The String is ". $string ."\n";
8 print "The reverse string is ". $rev_string ."\n";

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of variable in perl?

1001


How to connect with sqlserver from perl and how to display database table info?

903


Which guidelines by Perl modules must be followed?

961


How does a “grep” function perform?

964


Explain lists ?

880


What is the different between array and hash in perl programming?

871


What is the purpose of _package_ literal?

945


Does Perl have reference type?

892


How to prevent file truncation in perl?

935


How to implement a stack in Perl?

946


Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?

919


Give an example of using the -n and -p option.

941


How do you you check the return code of a command in perl?

936


what is the function that is used to identify how many characters are there in a string?

905


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

932