1#!/usr/bin/perl 2 3use strict; 4use warnings; 5 6use Config; 7 8#print "$_: ", ($Config{$_} or ""), "\n" for keys %Config; 9#exit; 10 11my @types = qw(char short int long longlong double); 12for (@types) { 13 my $bytes = $Config{"${_}size"}; 14 my $bits = $bytes * 8; 15 printf "size of %-10s: %5d bytes (%d bits)\n", $_, $bytes, $bits;; 16} 17 18print qq/ 19 These sizes reflect the platform and compiler options with 20 which Perl was built on this system. The sizes may change 21 if different compiler options are used. 22/; 23 24