Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Multiple Permutation handling

by Laurent_R (Monsignor)
on Mar 02, 2013 at 22:20 UTC ( #1021462=note: print w/ replies, xml ) Need Help??

in reply to Re: Multiple Permutation handling
in thread Multiple Permutation handling

Hello dear Perl Monks,

On a cross-post of the same question by the OP on the DevShed forum, I answered with a suggestion almost identical to Toolic's nested foreach loops.

However, this use of the glob function puzzles me. After some tests and reading in detail the glob description, I found this passage: "If non-empty braces are the only wildcard characters used in the glob, no filenames are matched, but potentially many strings are returned. For example, this produces nine strings, one for each pairing of fruits and colors".

So, now I understand why glob is being used in this context, but can anyone tell me why glob is doing this sort of things, which seems to have little to do with the normal usage of glob (by "normal", I just mean the usage that I have been knowing for years, i.e. returning filename extensions or a list of filename matching a shell file pattern)?

Comment on Re^2: Multiple Permutation handling
Replies are listed 'Best First'.
Re^3: Multiple Permutation handling
by choroba (Canon) on Mar 02, 2013 at 22:24 UTC
    In some shells, brace expansion is part of the filename patterns.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Thanks, I get the point now.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2015-11-26 14:20 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (701 votes), past polls