use strict; use warnings; for(1..(2**5-1)) { printf("%5b\n",$_); }