Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: Very Large Hex Combinations

by Taulmarill (Deacon)
on Aug 04, 2005 at 15:18 UTC ( #480863=note: print w/ replies, xml ) Need Help??


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"; } }


Comment on Re^4: Very Large Hex Combinations
Download Code
Re^5: Very Large Hex Combinations
by ikegami (Pope) on Aug 04, 2005 at 15:21 UTC
    Quite so, since all the loops have the same bounds. ++ed

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://480863]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2014-07-23 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (152 votes), past polls