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

We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2001


How do I debug a perl program?

516


Can inheritance be used in perl? Explain with the help of an example.

504


Can inheritance be used in perl?

549


What is a chomp() function in perl?

513






What is the syntax used in Perl grep function?

587


What are the options that can be used to avoid logic errors in perl?

516


How we can navigate the xml documents?

535


How to change a directory in perl?

544


Which functions in perl allows you to include a module file. State their differences.

524


What is perl pop array function?

532


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

483


What are the various file operations in perl. Explain with example.

516


Write syntax to add two arrays together in perl?

541


What is 'rollback' command in perl?

545