=0;$i--) { print $str[$i]; }" /> Write A Script To Reverse A String Without Using Perls Built In Function? =0;$i--) { print $str[$i]; }" /> =0;$i--) { print $str[$i]; }" />
Answers

Question and Answer:

  Home  CGI Perl

⟩ Write a script to reverse a string without using Perls built in function?

my $i;

my $str="hello";

my @str=split('',$str);

for($i=$#str;$i>=0;$i--)

{

print $str[$i];

}

 207 views

More Questions for you: