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 to read a single line from a file in perl?

971


Explain about the applications of perl?

975


What exactly is grooving and shortening of the array?

1021


What does file test operators do in perl?

916


Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)

1002


How to concatenate strings in perl?

1039


How interpreter is used in perl?

951


How to read file into hash array ?

1105


Can inheritance be used in perl?

997


List the data types that Perl can handle?

1053


You want to concatenate strings with perl. How would you do that?

876


How to determine strings length in perl?

968


What is perl push array function?

948


Comment on array slicing and range operator

946


what are the three groups involved in information sharing?

893