Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: glob quietly fails

by daxim (Chaplain)
on Oct 15, 2012 at 13:21 UTC ( #999086=note: print w/ replies, xml ) Need Help??


in reply to glob quietly fails

Q2: see Re: Hexamer combination from 3mers. about Algorithm::Combinatorics. Abusing glob for its permutation/variation/combination abilities is a terrible hack that needs to be extinguished.


Comment on Re: glob quietly fails
Re^2: glob quietly fails
by QM (Vicar) on Oct 15, 2012 at 15:14 UTC
    see Re: Hexamer combination from 3mers. about Algorithm::Combinatorics.

    Understood. But that doesn't solve the "array of arrays, 1 from each" problem. A shorter version of the OP glob spec would be

    @x = (1..2); @y = qw(one two); @z = qw(Amy Bob); @xyz = (\@x, \@y, \@z); $glob = join( ',', map { '{' . join( ',', @$_ ) . '}' } @xyz ); print "$glob\n"; # prints '{1,2},{one,two},{Amy,Bob}'

    I don't know of a module that can emulate glob on that.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      Actually I think your iterator solution is not half bad. It could work very well where nested foreach loops are not an option.

      I'd drop the redundant array_limits array, however.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-07-14 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (257 votes), past polls