in reply to Re^3: Very Large Hex Combinations
in thread Very Large Hex Combinations
i think one should use recursion here, something like this maybe
use strict; use warnings; my @charset = ( 0..9, "A".."F" ); rec( 8 ); sub rec { my $deep = shift; my $string = shift || ''; if ( $deep-- ) { for my $char ( @charset ) { rec( $deep, $string . $char ); } } else { print "$string\n"; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Very Large Hex Combinations
by ikegami (Patriarch) on Aug 04, 2005 at 15:21 UTC |
In Section
Seekers of Perl Wisdom