Write a script to reverse a string without using Perl's
built in function

Answer Posted / kiran pawar

my $string = "kiran";

my @name = split//,$string;

while(@name){

print pop @name;

}

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between exec and system?

748


How to close a file in perl?

686


How will you get the count of parameters passed to a perl subroutine?

702


Explain splicing of arrays?

679


What does -> symbol indicates in Perl?

744


How do I replace every character in a file with a comma?

701


Why to use perl scripting?

701


What is the peculiarity of returning values by subroutines in perl?

662


What is cpan in perl?

716


what is perl language?

712


What does length(%HASH) produce if you have thirty-seven random keys in a newly created hash?

763


How to concatenate strings with perl?

641


You want to open and read data files with perl. How would you do that?

679


How to find the length of an array in perl?

757


Explain chomp?

686