in reply to Re: Re: Converting Python to Perl and back again
in thread Converting Python to Perl and back again

Actualy, there is a way, though it's somwhat odd. Instead of using lists, use version-strings. In recent (>5.6, IIRC) versions of perl, v1.2.3 eq chr(1).chr(2).chr(3) (the v is optional if there are more then two elements, but be warned that there is a (fairly large) size limit on the elements), so what you're doing there is equivlent to

$a = v1.2.3; $b = v1.2.4; if ($a lt $b) { print "a is less than b"; }


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).