Dec 1, 2009, 8:36 PM
Post #1 of 4
For some reason, my reverse function doesn't seem to work properly. It won't reverse a string or a number, but it will work if we split it into a list and then join it back together. For example, here's what perlconsole gives me:
String reverse function doesn't work!!!
Perl> reverse (12345);
Perl> reverse ("string");
Perl> join '', reverse (split //, "string");
I'm running perl v.5.10.0 on Ubuntu. Any help is much appreciated -- I'm kinda weirded out. :)