http://qs1969.pair.com?node_id=59729


in reply to Huffman encoder

You can chop characters out like mad if you embrace the map EXPR, LIST syntax, instead of map BLOCK LIST. See, then:
map{$0{$_}++}split//,$_=<>; @0=map{[$_,$0{$_},$_]}keys%0;
become two PRECIOUS characters shorter:
map$0{$_}++,split//,$_=<>; @0=map[$_,$0{$_},$_],keys%0;


japhy -- Perl and Regex Hacker