[Israel.pm] perl on 64-bit machine

Gaal Yahas gaal at forum2.org
Thu Mar 10 07:23:20 PST 2005


Gaal Yahas wrote:

>> How can I know which perl I run, 32-bit or 64-bit?
>
> perl -le 'print ~0'
>
Better:

     perl -le 'print "This is a " . 3.2*length(~0) . " bit machine."'

(See, perl has a built-in log_10 function. Kinda.)

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/




More information about the Perl mailing list