in reply to Re: Determing "numeric value" of string?
in thread Determing "numeric value" of string?

oh boy...I was hoping it might be a little easier as most things are with Perl :)

Here is some test code :

use warnings; use strict; comparison( "This is another String", "This is yet another string"); comparison( "T5", "T4"); comparison( "1 begins this string", "2"); sub comparison { my($a,$b) = @_; print "ORD: " . ord($a) . "\n"; print "ORD: " . ord($b) . "\n"; if ( $a le $b ) { print " string :$a: is less than string :$b:\n\n"; } else { print " string :$a: is greater than string :$b:\n\n"; } }
Still, my problem is I can't get the numerical value of the strings I'm comparing...