Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    }
    
    print "Unicode string has @{[ length($str) ]} characters and consumes 
    +@{[ size($str) ]} bytes\n";
    
  2. or download this
    ASCII string has 80000000 characters and consumes 89779352 bytes
    Unicode string has 80000000 characters and consumes 273984424 bytes
    
  3. or download this
    use strict;
    use warnings;
    ...
    
    say "Printing in small chunks ($total_bytes_chunked bytes): @{[ timest
    +r(timediff($t1, $t0)) ]}";
    say "Printing one big chunk ($total_bytes_lump bytes): @{[ timestr(tim
    +ediff($t2, $t1)) ]}";