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"; }
|
|---|