in reply to stuck on newb problem

sort the characters of each, then compare with eq:
use warnings; use strict; my $s = 'hello'; my $x = join '', sort split //, $s; print "$x\n"; __END__ ehllo

Replies are listed 'Best First'.
Re^2: stuck on newb problem
by sweepy838 (Acolyte) on Apr 28, 2012 at 01:34 UTC
    ahh thank you :D such simple solution cant believe i never thought of that :o jeez