PerL Reverse the string.

Hi,

I am very new to perl.
My question:
How i can reverse the given string using substr function but without using reverse function in perl?
Anybody please help.

thanks,
-Lalit

2 of the many ways:
1) get the length of string, then using while loop, loop over the length, at the same time, do substring and print
2) use split on null value. the results will be in an array. use a for loop with decrement counter to loop over the array

$string="thestring";
@chars = split //, $string; 
for (.......some condition .....) {
  # print  the values of array
}

Since there is no good reason to want to do such a silly thing I have to conclude this is schoolwork. Read ther substr() functions documentation for how to accomplish this useless task.

THANKS ALOT GHOSTDOG74 :b: